/* ------- COLOR PALETTE ------- */
:root {
  --primary: #0A0B23; /* Primary color used for headings, icons, buttons */
  --accent: #06c371; /* Accent color for hover effects and highlights */
  --bg: #FFFFFF; /* Main background color */
  --text: #0A0B23; /* Default text color */
  --card: #FFFFFF; /* Background color for cards/forms */
  --border: #E5E5E5; /* Default border color */
}

/* ------- RESET ------- */
* {
  box-sizing: border-box; /* Include padding and border in element size */
  margin: 0; /* Remove default margin */
  padding: 0; /* Remove default padding */
  direction: rtl; /* Set right-to-left text direction */
  font-family: Open Sans, Heebo, Alef; /* Default font stack */
}

/* ------- GLOBAL ------- */
html, body {
  height: 100%; /* Full height for layout */
  margin: 0;
}

body {
  background: var(--bg); /* Set background color */
  color: var(--text); /* Default text color */
  line-height: 1.6; /* Default line spacing */
  display: flex; /* Flex container for main layout */
  flex-direction: column; /* Vertical stacking */
  min-height: 100vh; /* Ensure footer is at bottom */
  padding-top: 65px; /* Reserve space for header height */
}

/* ------- LAYOUT SPLIT ------- */
.contact-header { 
    text-align: center; /* Center heading text */
    margin-top: 50px; 
    margin-bottom: 50px; 
}

/* Contact page main heading */
.contact-header h1 { 
    font-size: 32px; 
    color: var(--primary); /* Primary color for emphasis */
}

/* Main layout: side info + form */
.contact-main-layout {
    display: flex; /* Flex layout for side-by-side cards */
    gap: 30px; /* Space between info and form */
    justify-content: center; /* Center horizontally */
    align-items: stretch; /* Match height of both cards */
    min-height: 500px;
    margin-bottom: 80px;
}

/* Left and right sections */
.contact-side-info, .contact-side-form { 
    flex: 0 0 auto; /* Do not grow/shrink automatically */
}

/* ------- CARDS ------- */
/* General card styling for info and form sections */
.contact-card {
    background: var(--mint); /* Card background color */
    padding: 25px; 
    border-radius: 16px; 
    box-shadow: 0 4px 14px rgba(0,0,0,0.1); /* Subtle shadow */
    height: 100%; 
    width: 450px; 
}

/* Card headings */
.contact-card h2 { 
    font-size: 28px; 
    margin-bottom: 25px; 
    color: var(--primary); 
    text-align: center; 
}

/* Info card specific layout */
.contact-side-info .contact-card { 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    text-align: center; 
}

/* Contact icons container */
.contact-icons { 
    display: flex; 
    justify-content: center; 
    gap: 40px; /* Space between icons */
    margin-bottom: 30px; 
}

/* Individual icons */
.contact-icon { 
    font-size: 48px; 
    color: var(--primary); 
    transition: 0.3s; /* Smooth hover transition */
    text-decoration: none; 
}

.contact-icon:hover { 
    color: var(--accent); /* Change color on hover */
    transform: scale(1.1); /* Slight zoom effect */
}

/* Contact details text */
.contact-details p { 
    font-size: 19px; 
    margin: 10px 0; 
}

/* ------- FORM ELEMENTS ------- */
/* Form card layout */
.contact-side-form .contact-card { 
    display: flex; 
    flex-direction: column; 
}

/* Form group wrapper */
.form-group { 
    margin-bottom: 12px; 
    position: relative; 
}

/* Inputs and textarea styling */
.form-group input, .form-group textarea {
    width: 100%; 
    padding: 10px; 
    border: 1px solid var(--border); 
    border-radius: 8px; 
    font-size: 15px; 
    outline: none; /* Remove default focus outline */
}

/* Focus state for inputs/textarea */
.form-group input:focus, .form-group textarea:focus { 
    border-color: var(--accent); /* Highlight on focus */
}

/* Textarea specific */
.form-group textarea { 
    height: 90px; 
    resize: none; /* Prevent manual resize */
}

/* Character counter below textarea */
.char-counter { 
    text-align: left; 
    font-size: 12px; 
    color: #666; 
    margin-top: 2px; 
}

/* File upload wrapper */
.file-upload-wrapper { 
    display: flex; 
    flex-direction: column; 
    align-items: flex-start; 
    gap: 8px; 
}

/* File upload button */
.file-label {
    background: var(--white); 
    border: 1px solid var(--primary); 
    color: var(--primary); 
    padding: 5px 12px; 
    border-radius: 20px; 
    cursor: pointer; 
    font-size: 14px; 
    font-weight: 600; 
    display: inline-flex; 
    align-items: center; 
    gap: 5px; 
    transition: all 0.2s ease;
}

/* Hover effect for file button */
.file-label:hover {
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.2); 
    transform: translateY(2px); 
}

/* Instruction text for file upload */
.file-instruction { 
    font-size: 10px; 
    color: #888; 
}

/* File status container (selected file) */
.file-status { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    background: rgba(10, 11, 35, 0.05); 
    padding: 4px 10px; 
    border-radius: 5px; 
    margin-top: 5px; 
}

/* Remove file button */
.remove-file-btn { 
    background: none; 
    border: none; 
    color: #ff4d4d; 
    font-size: 18px; 
    font-weight: bold; 
    cursor: pointer; 
}

/* Submit button */
.submit-btn { 
    width: 100%; 
    padding: 12px; 
    background: var(--primary); 
    color: white; 
    border: none; 
    border-radius: 8px; 
    font-size: 17px; 
    font-weight: 700; 
    cursor: pointer; 
    margin-top: auto; 
}

.submit-btn:hover { 
    background: var(--accent); 
    color: var(--primary); 
}

/* ------- ANIMATIONS ------- */
.fade-in { 
    opacity: 0; 
    transform: translateY(20px); 
    animation: fadeInUp 1s ease-out forwards; 
}

@keyframes fadeInUp { 
    to { opacity: 1; transform: translateY(0); } 
}

/* ------- HIGH CONTRAST MODE ------- */
body.high-contrast {
    background-color: #000 !important;
    color: #fff !important;
}

body.high-contrast header, 
body.high-contrast footer,
body.high-contrast .product-card {
    background-color: #000 !important;
    border: 2px solid #fff !important;
    color: #fff !important;
}

body.high-contrast a, 
body.high-contrast button {
    color: #ffff00 !important; /* Yellow links and buttons for visibility */
}

/* -------- RESPONSIVE DESIGN -------- */

/* Small screens - mobile up to 600px */
@media screen and (max-width: 600px) {
    .contact-main-layout {
        flex-direction: column; /* Stack cards vertically */
        gap: 20px;
        align-items: center;
        padding: 0 10px;
    }

    .contact-side-info .contact-card,
    .contact-side-form .contact-card {
        width: 100%; /* Full width for mobile */
        max-width: 400px;
        padding: 20px;
    }

    .contact-header h1 {
        font-size: 24px; 
        margin-top: 20px;
        margin-bottom: 30px;
    }

    .contact-icons {
        gap: 25px;
    }

    .contact-icon {
        font-size: 36px;
    }

    .contact-details p {
        font-size: 16px;
    }

    .form-group input,
    .form-group textarea {
        font-size: 14px;
        padding: 8px;
    }

    .submit-btn {
        font-size: 16px;
        padding: 10px;
    }

    .file-label {
        font-size: 13px;
        padding: 4px 10px;
    }

    .file-instruction {
        font-size: 9px;
    }

    .char-counter {
        font-size: 11px;
    }
}

/* Medium screens - tablet up to 900px */
@media screen and (max-width: 900px) {
    .contact-main-layout {
        flex-direction: column; /* Stack cards vertically */
        gap: 25px;
        align-items: center;
        padding: 0 20px;
    }

    .contact-side-info .contact-card,
    .contact-side-form .contact-card {
        width: 90%;
        max-width: 450px;
        padding: 22px;
    }

    .contact-header h1 {
        font-size: 28px;
        margin-bottom: 40px;
    }

    .contact-icons {
        gap: 30px;
    }

    .contact-icon {
        font-size: 42px;
    }

    .contact-details p {
        font-size: 18px;
    }

    .form-group input,
    .form-group textarea {
        font-size: 15px;
        padding: 10px;
    }

    .submit-btn {
        font-size: 17px;
        padding: 12px;
    }
}

/* Large screens - desktop layout */
@media screen and (min-width: 1200px) {
    .contact-main-layout {
        flex-direction: row; /* Side-by-side cards */
        gap: 30px;
        justify-content: center;
        align-items: stretch;
        padding: 0 50px;
    }

    .contact-side-info .contact-card,
    .contact-side-form .contact-card {
        width: 450px;
        padding: 25px;
    }
}
