/* GENERAL STYLING */
:root {
    --brand-navy: #0A2342;
    --brand-red: #B22234;
    --light-gray: #F4F4F4;
    --dark-text: #333;
    --light-text: #FFFFFF;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
    -webkit-text-size-adjust: 100%; /* Prevent iOS text size adjustment */
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: 'Lato', sans-serif;
    background-color: var(--light-text);
    color: var(--dark-text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%; /* Prevent iOS text size adjustment */
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased; /* Better font rendering on iOS */
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

h2 {
    font-size: 2.6rem;
    text-align: center;
    margin-top: 0;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.15rem;
    font-weight: 400;
    max-width: 700px;
    margin: 0 auto 2.5rem auto;
    text-align: center;
    color: #555;
}

/* STICKY NAVIGATION */
.sticky-nav {
    background-color: var(--light-text);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: 70px;
    display: flex;
    align-items: center;
}
.nav-container { display: flex; justify-content: space-between; align-items: center; width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
.nav-logo { height: 40px; width: auto; }
.nav-links { display: flex; align-items: center; }
.nav-links a { font-family: 'Montserrat', sans-serif; color: var(--brand-navy); text-decoration: none; margin-left: 1.5rem; font-weight: 600; padding: 0.25rem 0; border-bottom: 3px solid transparent; transition: color 0.3s ease, border-color 0.3s ease; }
.nav-links a:hover { color: var(--brand-red); }
.nav-links a.active { color: var(--brand-red); border-bottom-color: var(--brand-red); }
.nav-links .nav-login { border: 2px solid var(--brand-navy); padding: 0.4rem 1rem; border-radius: 5px; margin-left: 2rem; transition: all 0.3s ease; }
.nav-links .nav-login:hover, .nav-links .nav-login.active { background-color: var(--brand-navy); color: var(--light-text); border-color: var(--brand-navy); }

/* MOBILE MENU STYLES */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 30px;
    padding: 0;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background-color: var(--brand-navy);
    margin: 2px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: var(--light-text);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    flex-direction: column;
    z-index: 999;
}

.mobile-menu a {
    font-family: 'Montserrat', sans-serif;
    color: var(--brand-navy);
    text-decoration: none;
    padding: 1rem 2rem;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

.mobile-menu a:hover {
    background-color: var(--light-gray);
    color: var(--brand-red);
}

.mobile-menu a.nav-login {
    border: 2px solid var(--brand-navy);
    margin: 1rem 2rem;
    text-align: center;
    border-radius: 5px;
    border-bottom: 2px solid var(--brand-navy);
}

.mobile-menu a.nav-login:hover {
    background-color: var(--brand-navy);
    color: var(--light-text);
}

.mobile-menu.active {
    display: flex;
}

/* HERO SECTION */
.hero-section {
    color: var(--light-text);
    min-height: calc(100vh - 70px);
    margin-top: 70px; /* Account for fixed nav */
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(rgba(10, 35, 66, 0.9), rgba(10, 35, 66, 0.9)), url('../assetsimages/hero-background.png') no-repeat center center;
    background-size: cover;
    text-align: center;
    padding: 2rem;
    position: relative;
}
.hero-content { max-width: 850px; margin: 0 auto; }
.hero-section h1 { font-size: 3rem; color: var(--light-text); margin: 0 0 1rem 0; }
.hero-section .subtitle { color: rgba(255, 255, 255, 0.9); margin-bottom: 2.5rem; max-width: 700px; }
.cta-button, .cta-button-secondary { display: inline-block; background-color: var(--brand-red); color: var(--light-text); padding: 1rem 2.5rem; text-decoration: none; font-family: 'Montserrat', sans-serif; font-weight: 700; border-radius: 5px; font-size: 1.1rem; transition: all 0.3s ease; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); border: none; cursor: pointer; }
.cta-button:hover, .cta-button:focus { background-color: #9a1f2e; transform: translateY(-3px); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25); }

/* Trust Badge Styles (UPDATED) */
.trust-badge {
    position: absolute;
    top: 4rem;    /* Anchored to the top */
    left: 2rem;   /* Positioned on the left */
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 2rem; /* Additional top spacing */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    text-align: left;
}
.badge-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 700;
}
.badge-item:not(:last-child) {
    margin-bottom: 0.75rem;
}
.badge-item .fas {
    font-size: 1.1rem;
    margin-right: 0.75rem;
    min-width: 20px;
    text-align: center;
}

/* WHY US SECTION */
.why-us-section { background-color: var(--light-gray); }
.section-intro { text-align: center; max-width: 800px; margin: 0 auto 3rem auto; font-size: 1.1rem; }
.benefits-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem 2rem; text-align: center; }
.benefit-item .benefit-icon {
    width: 120px;
    height: 120px;
    margin-bottom: 0rem;
    object-fit: contain;
}
.benefit-item h3 { margin-top: -0.5rem; margin-bottom: 0.5rem; font-size: 1.3rem; }
.benefit-item p { font-size: 0.95rem; line-height: 1.5; }

/* HOW IT WORKS SECTION */
.how-it-works-section { background-color: var(--light-text); }
.steps-container { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.step { flex: 1; text-align: center; padding: 0 0.5rem; }
.step-number { width: 45px; height: 45px; line-height: 45px; border-radius: 50%; background-color: var(--brand-navy); color: var(--light-text); font-size: 1.4rem; font-family: 'Montserrat', sans-serif; margin: 0 auto 1rem auto; }
.step h3 { font-size: 1.4rem; margin-bottom: 0.5rem; }
.step p { font-size: 0.95rem; }
.step-arrow { font-size: 2.5rem; color: var(--brand-red); margin-top: 40px; }

/* TESTIMONIALS SECTION */
.testimonials-section { background-color: var(--light-gray); }
#testimonials .container { padding-bottom: 4rem; }
#testimonials h2 { margin-bottom: 2.5rem; }
.testimonial-slider-container { position: relative; overflow: hidden; max-width: 1100px; margin: 0 auto; }
.testimonial-track { display: flex; gap: 2rem; transition: transform 0.5s ease-in-out; padding: 0.5rem 0; }
.testimonial-card { background-color: var(--light-text); padding: 1.5rem; border-radius: 8px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07); display: flex; flex-direction: column; flex-shrink: 0; width: calc(33.333% - 22px); box-sizing: border-box; }
.testimonial-card .stars { color: #f39c12; font-size: 1.25rem; margin-bottom: 1rem; }
.testimonial-card p { flex-grow: 1; font-style: italic; color: var(--dark-text); margin-bottom: 1rem; font-size: 0.95rem; }
.testimonial-card footer { font-weight: 700; color: var(--brand-navy); text-align: right; }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); background-color: rgba(255,255,255,0.8); border: 1px solid #ddd; border-radius: 50%; width: 45px; height: 45px; font-size: 1.8rem; z-index: 10; box-shadow: 0 2px 5px rgba(0,0,0,0.1); transition: all 0.2s ease; }
.slider-btn:not(:disabled) { cursor: pointer; }
.slider-btn:hover:not(:disabled) { background-color: var(--brand-red); color: var(--light-text); border-color: var(--brand-red); }
.slider-btn:disabled { opacity: 0.2; cursor: not-allowed; }
.prev-btn { left: 10px; }
.next-btn { right: 10px; }

/* FAQ SECTION */
.faq-section { background-color: var(--light-gray); }
.faq-list { max-width: 800px; margin: 2rem auto 0 auto; }

/* FAQ Category Styling */
.faq-category { margin-bottom: 2.5rem; }
.faq-category:last-child { margin-bottom: 0; }
.faq-category-title { 
    font-size: 1.4rem; 
    color: var(--brand-navy); 
    font-family: 'Montserrat', sans-serif; 
    font-weight: 700; 
    margin-bottom: 1rem; 
    padding-bottom: 0.5rem; 
    border-bottom: 2px solid var(--brand-red); 
    text-align: left; 
}

/* FAQ Items */
.faq-list details { background-color: #FFFFFF; border-bottom: 1px solid #e0e0e0; margin-bottom: 0.5rem; border-radius: 5px; }
.faq-list details:last-child { border-bottom: 1px solid #e0e0e0; }
.faq-list summary { font-weight: 700; font-family: 'Montserrat', sans-serif; color: var(--brand-navy); padding: 1rem; cursor: pointer; list-style: none; position: relative; outline: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; font-size: 1.5rem; position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); transition: transform 0.2s ease; }
.faq-list details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-list p { padding: 0 1rem 1rem 1rem; margin: 0; color: #555; line-height: 1.7; }

/* FAQ Content Styling */
.faq-content { padding: 0 1rem 1rem 1rem; }
.faq-content ul { margin: 0; padding-left: 1.5rem; color: #555; line-height: 1.7; }
.faq-content li { margin-bottom: 0.5rem; }

/* PARTNER SECTION */
.partner-section { background-color: var(--light-gray); padding: 0; }
.two-columns { display: flex; align-items: center; gap: 0; }
.two-columns .text-content { flex: 1; }
.two-columns .image-container { flex: 1; display: flex; justify-content: flex-end; align-items: center; margin: 0; padding: 0; }
.info-image {
    width: 100%;
    max-width: 600px;
    height: 500px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: none;
    margin: 0;
}
.partner-section h2 { text-align: left; }
.partner-benefits { list-style: none; padding-left: 0; margin: 1.5rem 0; }
.partner-benefits li { padding-left: 2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23B22234'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left center; background-size: 1.5rem; margin-bottom: 0.75rem; font-size: 1.05rem; }
.cta-button-secondary { background-color: transparent; color: var(--brand-navy); border: 2px solid var(--brand-navy); box-shadow: none; padding: 0.8rem 2rem; }
.cta-button-secondary:hover { background-color: var(--brand-navy); color: var(--light-text); transform: translateY(-3px); }

/* CONTACT SECTION */
#contact.contact-section { background-color: var(--light-gray); }
#contact.contact-section .container { padding-top: 4rem; padding-bottom: 4rem; }
.contact-section .subtitle { margin-bottom: 2rem; }
.contact-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 2.5rem; align-items: flex-start; }
.contact-form .form-group { margin-bottom: 0.85rem; position: relative; }
.contact-form .form-group-row { display: flex; gap: 1.5rem; }
.contact-form label { display: block; margin-bottom: 0.4rem; font-weight: 700; color: var(--brand-navy); font-size: 0.9rem; }
.contact-form input, .contact-form textarea, .contact-form select { width: 100%; padding: 0.7rem; border: 1px solid #ccc; border-radius: 5px; font-size: 1rem; font-family: 'Lato', sans-serif; box-sizing: border-box; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
input[type="date"] { cursor: pointer; }

/* Form Validation States */
.contact-form input.error, .contact-form textarea.error, .contact-form select.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

.contact-form input.valid, .contact-form textarea.valid, .contact-form select.valid {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.15);
}

.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus {
    outline: none;
    border-color: var(--brand-navy);
    box-shadow: 0 0 0 0.2rem rgba(10, 35, 66, 0.15);
}

/* Field Error Messages */
.field-error {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: block;
    line-height: 1.3;
}

/* Form Submit Section */
.form-submit-section {
    margin-top: 1.5rem;
    text-align: center;
}

/* Form Message Display */
.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 5px;
    display: none;
    text-align: left;
    line-height: 1.5;
}

.form-message.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.form-message.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.form-message.warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.form-message h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.form-message p {
    margin: 0.5rem 0;
}

.form-message ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.form-message li {
    margin-bottom: 0.25rem;
}

.form-message a {
    color: inherit;
    text-decoration: underline;
}

.form-message a:hover {
    text-decoration: none;
}

/* Security Block Message Styling */
.security-block-message,
.max-attempts-message {
    text-align: center;
}

.security-block-message h4,
.max-attempts-message h4 {
    color: #721c24;
    margin-bottom: 1rem;
}

.security-block-message ul,
.max-attempts-message ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.security-block-message li,
.max-attempts-message li {
    background: rgba(113, 28, 36, 0.1);
    padding: 0.5rem 1rem;
    margin: 0.5rem 0;
    border-radius: 3px;
    border-left: 3px solid #721c24;
}

/* Form States */
.contact-form.submitting input,
.contact-form.submitting textarea,
.contact-form.submitting select {
    opacity: 0.7;
    pointer-events: none;
}

.contact-form.form-blocked {
    opacity: 0.6;
}

.contact-form.form-blocked input,
.contact-form.form-blocked textarea,
.contact-form.form-blocked select {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

/* Submit Button States */
.cta-button .submit-spinner {
    display: none;
}

.cta-button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.cta-button:disabled:hover {
    background-color: #6c757d;
    transform: none;
    box-shadow: none;
}

/* Spinner Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spinner.fa-spin {
    animation: spin 1s linear infinite;
}

/* Accessibility Improvements */
[aria-invalid="true"] {
    border-color: #dc3545 !important;
}

[aria-invalid="false"].valid {
    border-color: #28a745 !important;
}

/* Focus Management */
.contact-form input:focus-visible,
.contact-form textarea:focus-visible,
.contact-form select:focus-visible {
    outline: 2px solid var(--brand-navy);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .contact-form input.error,
    .contact-form textarea.error,
    .contact-form select.error {
        border-width: 2px;
    }
    
    .contact-form input.valid,
    .contact-form textarea.valid,
    .contact-form select.valid {
        border-width: 2px;
    }
    
    .field-error {
        font-weight: 600;
    }
}
/* Phone input styling */
.phone-input-container { display: flex; align-items: center; gap: 0; }
.country-code-select { 
    flex-shrink: 0; 
    width: 120px;
    border-top-right-radius: 0; 
    border-bottom-right-radius: 0; 
    background-color: #e9ecef; 
}
.other-code-input { 
    flex-shrink: 0; 
    border-radius: 0; 
    width: 65px; 
    border-left: 0; 
    border-right: 0; 
}
.phone-number-input { 
    flex-grow: 0.6; 
    border-top-left-radius: 0; 
    border-bottom-left-radius: 0; 
    border-left: 1px solid #ccc;
    margin-left: 8px;
}

/* Form field sizing for phone and country row */
.phone-field {
    flex: 1.2;
    margin-right: 1rem;
}
.country-field {
    flex: 0.8;
}
.country-input {
    width: 100%;
}

/* Timeframe section styling */
.timeframe-section {
    margin: 1.5rem 0 1rem 0;
}
.timeframe-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brand-navy);
    margin: 0 0 0.5rem 0;
    font-family: 'Montserrat', sans-serif;
}
.timeframe-description {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    line-height: 1.5;
    font-style: italic;
}
.contact-info h3 { margin-top: 0; font-size: 1.4rem; }
.contact-info p { font-size: 0.95rem; margin-bottom: 1rem; }
.contact-links { list-style: none; padding: 0; margin-top: 1.5rem; }
.contact-links li { margin-bottom: 1rem; }
.contact-links a { text-decoration: none; color: var(--dark-text); font-size: 1rem; transition: color 0.3s ease; display: flex; align-items: center; gap: 10px; }
.contact-links a:hover { color: var(--brand-red); }
.contact-links strong { color: var(--brand-navy); }
.contact-links .fab, .contact-links .fas { color: var(--brand-red); font-size: 1.2rem; min-width: 20px; text-align: center; }
.social-media { margin-top: 1.5rem; }
.social-media a { color: var(--brand-navy); font-size: 1.6rem; margin-right: 1.25rem; transition: all 0.3s ease; }
.social-media a:hover { color: var(--brand-red); transform: scale(1.1); }

/* FOOTER */
.footer { background-color: var(--brand-navy); color: var(--light-text); text-align: center; padding: 1.5rem; }
.footer-links { margin-bottom: 1rem; }
.footer-links a { color: var(--light-text); text-decoration: none; margin: 0 0.75rem; font-size: 0.9rem; opacity: 0.8; transition: opacity 0.2s ease; }
.footer-links a:hover { opacity: 1; text-decoration: underline; }
.footer-note { font-size: 0.8rem; color: rgba(255,255,255,0.6); margin: 0.5rem 0 0 0; }

/* iOS Safari specific fixes */
img {
    max-width: 100%;
    height: auto;
    -webkit-user-drag: none; /* Prevent image dragging on iOS */
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    /* iPhone-specific image constraints */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* iPhone-specific fixes */
@supports (-webkit-touch-callout: none) {
    /* iPhone Safari safe area support */
    .sticky-nav {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    
    .hero-section {
        padding-top: max(2rem, env(safe-area-inset-top));
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    
    /* Fix for iPhone Safari viewport height issues */
    .hero-section {
        min-height: -webkit-fill-available;
        /* Fallback for older iOS versions */
        min-height: calc(100vh - 70px);
        /* New viewport units for iOS 15+ */
        min-height: calc(100svh - 70px);
    }
    
    /* Additional viewport handling for iPhone */
    body {
        /* Prevent content from jumping when address bar hides/shows */
        min-height: 100vh;
        min-height: -webkit-fill-available;
        min-height: 100svh;
    }
    
    /* Container adjustments for iPhone viewport */
    .container {
        /* Ensure containers work well with dynamic viewport */
        min-height: auto;
    }
    
    /* Prevent iOS Safari from zooming on form inputs */
    input[type="text"],
    input[type="email"], 
    input[type="tel"],
    input[type="date"],
    textarea,
    select {
        font-size: 16px !important;
        -webkit-appearance: none;
        -webkit-border-radius: 0;
        border-radius: 5px;
    }
    
    /* iPhone image optimization */
    .benefit-icon,
    .info-image,
    .nav-logo {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: auto;
    }
    
    /* WebKit-specific Safari bug fixes */
    /* Fix for Safari flexbox bugs */
    .nav-container,
    .contact-grid,
    .two-columns,
    .steps-container,
    .benefits-grid {
        -webkit-flex-wrap: wrap;
        flex-wrap: wrap;
    }
    
    /* Fix for Safari transform bugs */
    .cta-button,
    .cta-button-secondary,
    .slider-btn {
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        -webkit-perspective: 1000;
        perspective: 1000;
    }
    
    /* Fix for Safari border-radius clipping */
    .testimonial-card,
    .benefit-item,
    .contact-form input,
    .contact-form textarea,
    .contact-form select {
        -webkit-mask-image: -webkit-radial-gradient(white, black);
        mask-image: radial-gradient(white, black);
    }
    
    /* Fix for Safari sticky positioning */
    .sticky-nav {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    /* Fix for Safari scroll performance */
    .testimonial-track {
        -webkit-overflow-scrolling: touch;
        will-change: transform;
    }
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
    .testimonial-card { width: calc(50% - 1rem); }
    .two-columns { gap: 2rem; }
}

@media (max-width: 992px) {
    .nav-links a:not(.nav-login) { display: none; }
}

@media (max-width: 768px) {
    html { 
        scroll-padding-top: 70px;
        /* iOS specific viewport fixes - less aggressive for iPhone */
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    
    /* iOS Safari viewport bug fixes */
    * {
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
    }
    
    /* Navigation logo sizing fix for iOS */
    .nav-logo {
        height: 40px !important;
        width: auto !important;
        max-height: 40px;
    }
    .nav-links { display: none; }
    .mobile-menu-toggle { display: flex; }
    .container { padding: 2.5rem 1.25rem; }
    .hero-section { 
        min-height: auto;
        padding: 2rem 1rem;
    }
    .hero-content {
        padding-top: 1rem; /* Add top padding to hero-content to push content down */
    }
    .hero-section h1 { 
        font-size: 2rem; 
        line-height: 1.3;
        margin-bottom: 1rem;
    }
    .hero-section .subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
        padding: 0 0.5rem;
    }
    h2 { font-size: 1.8rem; }
    .subtitle { font-size: 1rem; }
    .steps-container { flex-direction: column; align-items: center; gap: 1rem; }
    .step-arrow { display: none; }
    .two-columns { flex-direction: column; gap: 2rem; }
    .two-columns .image-container { order: -1; }
    .partner-section h2 { text-align: center; }
    .contact-grid { grid-template-columns: 1fr; }
    .contact-form .form-group-row { flex-direction: column; gap: 0; }
    .form-group-row .form-group { margin-bottom: 1rem; }
    .testimonial-slider-container { padding: 0; }
    .testimonial-card { width: 100%; }
    .slider-btn { display:none; }
    
    /* Mobile Form Enhancement Styles */
    .form-message {
        padding: 0.75rem;
        margin-top: 0.75rem;
        font-size: 0.9rem;
    }
    
    .form-message h4 {
        font-size: 1rem;
    }
    
    .security-block-message,
    .max-attempts-message {
        text-align: left;
    }
    
    .security-block-message li,
    .max-attempts-message li {
        padding: 0.4rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .field-error {
        font-size: 0.8rem;
    }
    
    .form-submit-section {
        margin-top: 1.25rem;
    }
    
    /* Hero CTA Button - Centered and sized appropriately */
    .hero-section .cta-button {
        display: inline-block;
        width: auto;
        max-width: 200px;
        padding: 0.9rem 2rem;
        font-size: 1rem;
    }
    
    /* Form submit button - Full width */
    .contact-form .cta-button {
        width: 100%;
        padding: 0.85rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Trust Badge - Hidden on Mobile */
    .trust-badge {
        display: none;
    }
    
    /* Benefits Grid Mobile Optimization */
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .benefit-item .benefit-icon {
        width: 70px !important;
        height: 70px !important;
        max-width: 70px;
        max-height: 70px;
        margin-bottom: 0.5rem;
        object-fit: contain;
        /* iPhone-specific optimizations */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    
    .benefit-item h3 {
        font-size: 1.1rem;
        margin-top: 0;
    }
    
    .benefit-item p {
        font-size: 0.9rem;
    }
    
    /* Section Intro Mobile */
    .section-intro {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    /* Steps Container Mobile */
    .step {
        padding: 0 1rem;
        margin-bottom: 1rem;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 1.2rem;
    }
    
    .step h3 {
        font-size: 1.2rem;
    }
    
    .step p {
        font-size: 0.9rem;
    }
    
    /* Mobile phone input fixes with higher specificity */
    .contact-section .contact-form .country-code-select { 
        width: 80px !important; 
        flex-shrink: 0;
    }
    .contact-section .contact-form .phone-number-input { 
        flex-grow: 1 !important; 
        margin-left: 0 !important;
        border-left: 1px solid #ccc;
        min-width: 0;
    }
    .contact-section .contact-form .other-code-input { 
        width: 50px !important; 
    }
    .contact-section .contact-form .phone-input-container {
        gap: 0 !important;
    }
    
    /* Partner Section Mobile */
    .partner-section .info-image {
        width: 100% !important;
        max-width: 100%;
        height: 250px !important;
        max-height: 250px;
        object-fit: cover;
        border-radius: 8px;
    }
    
    .partner-benefits li {
        font-size: 0.95rem;
        padding-left: 1.75rem;
        background-size: 1.25rem;
    }
    
    /* Footer Mobile */
    .footer {
        padding: 1.25rem 1rem;
    }
    
    .footer-links a {
        display: inline-block;
        margin: 0.25rem 0.5rem;
        font-size: 0.85rem;
    }
}

/* Tablet-specific styling (769px - 991px) */
@media (min-width: 769px) and (max-width: 991px) {
    /* Tablet phone input fixes */
    .contact-section .contact-form .country-code-select { 
        width: 100px; 
    }
    .contact-section .contact-form .phone-number-input { 
        flex-grow: 1; 
        margin-left: 0;
        border-left: 1px solid #ccc;
    }
    .contact-section .contact-form .other-code-input { 
        width: 60px; 
    }
    .contact-section .contact-form .phone-input-container {
        gap: 0;
    }
}

/* iPhone SE and smaller devices */
@media only screen and (max-width: 375px) {
    .hero-section h1 {
        font-size: 1.6rem !important;
    }
    
    .benefit-item .benefit-icon {
        width: 55px !important;
        height: 55px !important;
    }
    
    .container {
        padding: 2rem 1rem;
    }
}

/* iPhone X, 11 Pro, 12 mini and similar */
@media only screen and (min-device-width: 375px) and (max-device-width: 414px) and (-webkit-device-pixel-ratio: 3) {
    /* Specific adjustments for these iPhone models */
    .hero-section {
        padding-top: max(2rem, env(safe-area-inset-top, 44px));
        padding-bottom: max(2rem, env(safe-area-inset-bottom, 34px));
    }
    
    .sticky-nav {
        padding-top: env(safe-area-inset-top, 0px);
    }
}

/* iPhone Plus and larger models */
@media only screen and (min-device-width: 414px) and (max-device-width: 480px) and (-webkit-device-pixel-ratio: 3) {
    .hero-section h1 {
        font-size: 2.2rem !important;
    }
    
    .benefit-item .benefit-icon {
        width: 75px !important;
        height: 75px !important;
    }
}

/* iPhone-specific fixes - General iPhone targeting */
@media only screen and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2) {
    /* Target iPhone devices specifically */
    .hero-section {
        background-attachment: scroll; /* Fix for iPhone background-attachment issues */
    }
    
    .benefit-item .benefit-icon {
        width: 60px !important;
        height: 60px !important;
        max-width: 60px;
        max-height: 60px;
    }
    
    .nav-logo {
        height: 35px !important;
        max-height: 35px !important;
    }
    
    .partner-section .info-image {
        width: 100% !important;
        height: 200px !important;
        max-height: 200px;
        object-fit: cover;
    }
    
    /* Ensure all images are properly constrained */
    img {
        max-width: 100% !important;
        height: auto !important;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    /* iPhone text scaling adjustments */
    .hero-section h1 {
        font-size: 1.75rem !important;
        line-height: 1.2;
    }
    
    .hero-section .subtitle {
        font-size: 0.95rem !important;
        line-height: 1.4;
    }
    
    h2 {
        font-size: 1.6rem !important;
        line-height: 1.3;
    }
    
    .subtitle {
        font-size: 0.95rem !important;
        line-height: 1.4;
    }
    
    .benefit-item h3 {
        font-size: 1rem !important;
        line-height: 1.2;
    }
    
    .benefit-item p {
        font-size: 0.85rem !important;
        line-height: 1.4;
    }
    
    .step h3 {
        font-size: 1.1rem !important;
    }
    
    .step p {
        font-size: 0.85rem !important;
        line-height: 1.4;
    }
}

/* Laptop-specific size reductions for Partners section */
@media (min-width: 992px) and (max-width: 1920px) {
    .partner-section .container {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    .partner-section .two-columns {
        gap: 1.5rem;
    }
    .partner-section h2 {
        font-size: 1.85rem;
        margin-bottom: 0.5rem;
    }
    .partner-section .text-content p {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    .partner-section .partner-benefits {
        margin: 0.75rem 0 1rem;
    }
    .partner-section .partner-benefits li {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
        padding-left: 1.6rem;
        background-size: 1rem;
    }
    .partner-section .cta-button-secondary {
        padding: 0.55rem 1.2rem;
        font-size: 0.95rem;
    }
    .partner-section .info-image {
        max-width: 500px;
        height: 450px;
    }

    /* Contact section sizing tweaks for laptops */
    #contact.contact-section .container {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    .contact-section h2 {
        font-size: 1.85rem;
        margin-bottom: 0.5rem;
    }
    .contact-section .subtitle {
        font-size: 1.05rem;
        margin-bottom: 1.25rem;
    }
    .contact-section .contact-grid {
        gap: 1.75rem;
    }
    .contact-section .contact-form .form-group { 
        margin-bottom: 0.75rem; 
    }
    .contact-section .contact-form .form-group-row { 
        gap: 1rem; 
    }
    .contact-section .contact-form label { 
        font-size: 0.85rem; 
    }
    .contact-section .contact-form input,
    .contact-section .contact-form textarea,
    .contact-section .contact-form select { 
        font-size: 0.95rem; 
        padding: 0.6rem; 
    }
    .contact-section .other-code-input { 
        width: 60px; 
    }
    
    .contact-section .country-code-select {
        width: 100px;
    }
    
    .contact-section .phone-field {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    .contact-section .cta-button { 
        padding: 0.55rem 1.2rem; 
        font-size: 0.95rem; 
    }
    .contact-section .social-media a { 
        font-size: 1.4rem; 
    }
}