* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=Noto+Kufi+Arabic:wght@500;700&display=swap');

body {
    /* خلفية متدرجة عصرية مستوحاة من icomos.css */
    background: linear-gradient(135deg, rgba(197, 145, 0, 0.3) 0%, rgba(255, 224, 138, 0.4) 50%, rgba(197, 145, 0, 0.3) 100%), url('../images/night.jpg') center/cover fixed no-repeat;
    background-size: 100% 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: 'Cairo', Arial, sans-serif;
    color: #333;
    overflow-x: hidden;
}

/* Arabic official typography overrides */
html[lang="ar"] body {
    font-family: 'IBM Plex Sans Arabic', 'Cairo', Tahoma, Arial, sans-serif;
}
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] .section-title {
    font-family: 'Noto Kufi Arabic', 'IBM Plex Sans Arabic', 'Cairo', system-ui, sans-serif;
}

/* iPhone/iOS specific fixes - only for iOS devices */
@supports (-webkit-touch-callout: none) {
  body {
    background-attachment: scroll;
    background-size: cover;
    -webkit-background-size: cover;
  }
}

/* Style principal de la page */
.contact {
    width: 100%;
    min-height: 100vh;
    padding-top: 60px;
}

main {
    width: 100%;
    max-width: 100%;
}


/* Section principale */
.contact-section {
    max-width: 1000px;
    width: 95%;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(135deg, #c59100 0%, #ffe08a 50%, #c59100 100%) !important;
    box-shadow: 0 5px 15px rgba(197, 145, 0, 0.3) !important;
    border: 1px solid rgba(197, 145, 0, 0.5) !important;
    border-radius: 15px;
    margin-top: 20px;
    margin-bottom: 20px;
    box-sizing: border-box;
    text-align: center;
}

.contact-section h2 {
    color: #333;
    text-align: center;
    margin-bottom: 20px;
    background: linear-gradient(135deg, rgba(197, 145, 0, 0.2) 0%, rgba(255, 224, 138, 0.3) 50%, rgba(197, 145, 0, 0.2) 100%) !important;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(197, 145, 0, 0.2) !important;
    border: 1px solid rgba(197, 145, 0, 0.3) !important;
}

.contact-intro {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    background: linear-gradient(135deg, rgba(197, 145, 0, 0.1) 0%, rgba(255, 224, 138, 0.2) 50%, rgba(197, 145, 0, 0.1) 100%) !important;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(197, 145, 0, 0.2) !important;
    border: 1px solid rgba(197, 145, 0, 0.3) !important;
}

/* Cartes d'information */
.contact-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin: 30px 0;
    background: linear-gradient(135deg, rgba(197, 145, 0, 0.1) 0%, rgba(255, 224, 138, 0.2) 50%, rgba(197, 145, 0, 0.1) 100%) !important;
    box-shadow: 0 3px 10px rgba(197, 145, 0, 0.2) !important;
    border: 1px solid rgba(197, 145, 0, 0.3) !important;
    border-radius: 10px;
    padding: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.info-card {
    background: linear-gradient(135deg, #c59100 0%, #ffe08a 50%, #c59100 100%) !important;
    box-shadow: 0 5px 15px rgba(197, 145, 0, 0.3) !important;
    border: 1px solid rgba(197, 145, 0, 0.5) !important;
    color: #333;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin: 15px 0;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.card-icon {
    width: 60px;
    height: 60px;
    background: #c59100;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: white;
    font-size: 24px;
}

/* Formulaire et carte */
.contact-container {
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 20px;
    margin: 20px 0;
    background: linear-gradient(135deg, rgba(197, 145, 0, 0.1) 0%, rgba(255, 224, 138, 0.2) 50%, rgba(197, 145, 0, 0.1) 100%) !important;
    box-shadow: 0 3px 10px rgba(197, 145, 0, 0.2) !important;
    border: 1px solid rgba(197, 145, 0, 0.3) !important;
    border-radius: 10px;
    padding: 15px;
}

.form-wrapper {
    background: linear-gradient(135deg, #c59100 0%, #ffe08a 50%, #c59100 100%) !important;
    box-shadow: 0 5px 15px rgba(197, 145, 0, 0.3) !important;
    border: 1px solid rgba(197, 145, 0, 0.5) !important;
    color: #333;
    padding: 25px;
    border-radius: 15px;
    margin: 20px auto;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.form-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(197, 145, 0, 0.1) 0%, rgba(255, 224, 138, 0.2) 50%, rgba(197, 145, 0, 0.1) 100%);
    border-radius: 15px;
    z-index: -1;
}

.input-group {
    position: relative;
    margin-bottom: 25px;
    display: block;
}

/* Hide honeypot field completely */
input[name="website"] {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    border: none !important;
    background: transparent !important;
    color: transparent !important;
    overflow: hidden !important;
    z-index: -1 !important;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    color: #333;
    min-height: 44px;
    box-sizing: border-box;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #c59100;
    box-shadow: 0 0 5px rgba(197, 145, 0, 0.3);
}

.input-group label {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #ffe08a;
    padding: 0 5px;
    color: #333;
    transition: all 0.3s ease;
    pointer-events: none;
}

.input-group textarea ~ label {
    top: 20px;
    transform: none;
}

.input-group input:focus ~ label,
.input-group textarea:focus ~ label,
.input-group input:valid ~ label,
.input-group textarea:valid ~ label {
    top: -12px;
    font-size: 12px;
    color: #333;
    background: #ffe08a;
}

.submit-btn {
    background: linear-gradient(90deg, #c59100 0%, #ffe08a 100%);
    color: #333;
    border: 2px solid rgba(197, 145, 0, 0.5);
    padding: 12px 25px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(197, 145, 0, 0.3), 0 0 20px rgba(197, 145, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    background: linear-gradient(90deg, #a37800 0%, #f0d080 100%);
    color: #333;
}

/* Map */
.map-wrapper {
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(197, 145, 0, 0.1) 0%, rgba(255, 224, 138, 0.2) 50%, rgba(197, 145, 0, 0.1) 100%) !important;
    box-shadow: 0 3px 10px rgba(197, 145, 0, 0.2) !important;
    border: 1px solid rgba(197, 145, 0, 0.3) !important;
    padding: 10px;
}

.map-wrapper iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #c59100 0%, #ffe08a 50%, #c59100 100%) !important;
    box-shadow: 0 5px 15px rgba(197, 145, 0, 0.3) !important;
    border: 1px solid rgba(197, 145, 0, 0.5) !important;
    color: #333;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* Responsive */
@media (max-width: 992px) {
    .contact-info {
        grid-template-columns: repeat(2, 1fr);
        max-width: 700px;
    }
    
    .contact-container {
        display: block;
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Headings and intro text sizes */
    .contact-section h2 { font-size: 1.3em; line-height: 1.25; padding: 12px; }
    .contact-intro { font-size: 1em; line-height: 1.7; padding: 12px; }

    body {
        background: linear-gradient(135deg, rgba(197, 145, 0, 0.3) 0%, rgba(255, 224, 138, 0.4) 50%, rgba(197, 145, 0, 0.3) 100%), url('../images/night.jpg') center/cover fixed no-repeat;
        background-size: 100% 100%;
    }
    
    .contact {
        padding-top: 80px;
    }
    
    .contact-section {
        max-width: 98%;
        width: 98%;
        margin: 5px auto;
        padding: 15px;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
        padding: 12px;
    }
    
    .contact-container {
        display: block;
        grid-template-columns: 1fr;
        padding: 10px;
        text-align: center;
        margin: 0 auto;
    }
    
    .form-wrapper {
        padding: 16px;
        text-align: center;
        margin: 0 auto;
    }
    
    .input-group {
        text-align: center;
        margin: 0 auto 25px auto;
    }
    
    .input-group input,
    .input-group textarea {
        text-align: center;
        font-size: 15px;
    }
    
    
    .language-selector {
        top: 15px;
        right: 15px;
    }

    .info-card h3 { font-size: 1em; }
    .info-card p { font-size: 0.95em; }
    .card-icon { width: 48px; height: 48px; font-size: 20px; }
    .submit-btn { padding: 10px 18px; }
    .map-wrapper { height: 300px; }
}

/* RTL/LTR Support */
[dir="ltr"] .input-group label {
    right: auto;
    left: 10px;
}

[dir="ltr"] .language-selector {
    left: auto;
    right: 20px;
}

/* Fix RTL direction issues */
[dir="rtl"] .contact-section {
    text-align: center;
}

[dir="rtl"] .contact-info {
    text-align: center;
}

[dir="rtl"] .contact-container {
    text-align: center;
}

[dir="rtl"] .form-wrapper {
    text-align: center;
}

[dir="rtl"] .input-group {
    text-align: center;
}

[dir="rtl"] .input-group input,
[dir="rtl"] .input-group textarea {
    text-align: center;
}

/* reCAPTCHA Styling */
.recaptcha-container {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.g-recaptcha {
    transform: scale(1);
    transform-origin: 0 0;
}

/* Responsive reCAPTCHA */
@media (max-width: 768px) {
    .g-recaptcha {
        transform: scale(0.9);
    }
}

@media (max-width: 480px) {
    .contact-section h2 { font-size: 1.15em; line-height: 1.2; padding: 10px; }
    .contact-intro { font-size: 0.95em; line-height: 1.6; padding: 10px; }

    body {
        background: linear-gradient(135deg, rgba(197, 145, 0, 0.3) 0%, rgba(255, 224, 138, 0.4) 50%, rgba(197, 145, 0, 0.3) 100%), url('../images/night.jpg') center/cover fixed no-repeat;
        background-size: 100% 100%;
    }
    
    .contact-section {
        max-width: 98%;
        margin: 5px auto;
        padding: 10px 8px;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
        padding: 8px;
        margin: 15px 0;
        max-width: 100%;
    }
    
    .contact-container {
        display: block;
        grid-template-columns: 1fr;
        padding: 4px;
        text-align: center;
        margin: 0 auto;
    }
    
    .form-wrapper {
        padding: 12px;
        text-align: center;
        margin: 0 auto;
    }
    
    .input-group {
        text-align: center;
        margin: 0 auto 16px auto;
    }
    
    .input-group input,
    .input-group textarea {
        text-align: center;
        font-size: 14px;
    }
    
    .info-card {
        padding: 12px;
        margin: 8px 0;
    }
    
    .g-recaptcha {
        transform: scale(0.8);
    }

    .info-card h3 { font-size: 0.95em; }
    .info-card p { font-size: 0.9em; }
    .card-icon { width: 42px; height: 42px; font-size: 18px; }
    .submit-btn { padding: 9px 16px; }
    .map-wrapper { height: 240px; }
}

/* Honeypot field styles */
.honeypot-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.honeypot-input {
    width: 1px;
    height: 1px;
    border: none;
    background: transparent;
    color: transparent;
}

/* Map iframe styles */
.map-iframe {
    border: 0;
}

/* Creator credit styles */
.creator-credit {
    font-size: 0.8em;
    margin-top: 5px;
    opacity: 0.8;
}