/* Custom Fonts */
@font-face {
    font-family: 'Archivo';
    src: url('assets/Archivo-VariableFont.ttf') format('truetype');
    font-weight: 400 700;
    font-style: normal;
}

@font-face {
    font-family: 'Archivo';
    src: url('assets/Archivo-Italic-VariableFont.ttf') format('truetype');
    font-weight: 400 700;
    font-style: italic;
}

@font-face {
    font-family: 'Inter';
    src: url('assets/Inter-VariableFont.ttf') format('truetype');
    font-weight: 400 700;
    font-style: normal;
}

@font-face {
    font-family: 'Inter';
    src: url('assets/Inter-Italic-VariableFont.ttf') format('truetype');
    font-weight: 400 700;
    font-style: italic;
}

/* Tailwind Font Classes */
.font-archivo {
    font-family: 'Archivo', sans-serif;
}

.font-inter {
    font-family: 'Inter', sans-serif;
}

/* Background Images */
.hero-bg {
    background-image: url('assets/hero_bg.png');
}

.why-us-bg {
    background-image: url('assets/whyus_bg.png');
}

/* Mobile-specific why-us background */
@media (max-width: 768px) {
    .why-us-bg {
        background-image: url('assets/whyus_bg_mobile.png');
        background-position: center top;
        background-size: cover;
    }
}

/* Why Us Section Styling */
.why-us-section {
    position: relative;
    min-height: 860px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.why-us-section .relative.z-10 {
    padding-top: 80px;
}

/* Responsive Typography Adjustments */
@media (max-width: 640px) {
    .hero-section h1 {
        font-size: 2.5rem;
        line-height: 0.95; /* Adjusted headline spacing */
    }
    
    .hero-section p {
        font-size: 1rem;
        line-height: 1.2; /* Tighter subheadline spacing */
    }
    
    .hero-section button {
        line-height: 1; /* Tighter button spacing */
    }
}

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .hero-section p {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    .feature-block h2 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .feature-block p {
        font-size: 1rem;
        line-height: 1.6;
    }
}

/* Ensure proper image scaling */
img {
    max-width: 100%;
    height: auto;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Hero Section Exact Figma Styling */
.hero-section {
    position: relative;
    min-height: 860px;
}

.hero-section .relative.z-10 {
    padding-top: 0;
    text-align: center;
}

.hero-section h1 {
    font-weight: 450;
    font-size: 64px;
    line-height: 60px;
    letter-spacing: 0;
    margin-bottom: 20px;
    text-align: center;
}

.hero-section p {
    font-weight: 500;
    font-size: 18px;
    line-height: 21.784px;
    letter-spacing: 0;
    margin-bottom: 18px;
    text-align: center;
}

.hero-section button {
    font-weight: 700;
    font-size: 14px;
    line-height: 16.943px;
    letter-spacing: 0;
}

/* Hero Section Text Reveal Animation */
.text-reveal {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeSlideUp 0.8s ease-out forwards;
}

/* Optional: delay for different elements */
.text-reveal:nth-of-type(2) {
    animation-delay: 1s;
}

.text-reveal:nth-of-type(3) {
    animation-delay: 2s;
}

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

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #f8ede3;
    padding: 2rem;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(40px);
    transition: transform 0.3s ease-in-out;
}

.modal-overlay.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.modal-close:hover {
    background-color: rgba(64, 45, 41, 0.1);
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-input {
    padding: 0.75rem;
    border: 2px solid #ddc8b5;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #402d29;
    background-color: white;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #6f2e1f;
}

.submit-btn {
    background-color: #6f2e1f;
    color: white;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 16px;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.submit-btn:hover {
    background-color: #5a2518;
}

.hidden {
    display: none;
}

/* All Archivo headlines font weight */
.font-archivo {
    font-weight: 450;
}

/* Feature Image Positioning for Desktop */
@media (min-width: 1024px) {
    .feature1-image {
        position: relative;
        right: -64px; /* Account for container padding + grid gap */
    }
    
    .feature3-image {
        position: relative;
        right: -64px; /* Account for container padding + grid gap */
    }
}

/* Results Section Styling */
.results-stats {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
}

.stats-container {
    position: relative;
    width: 539px;
    height: 106px;
    padding-top: 40px;
}

.stat {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.stat-label {
    opacity: 0.5;
}

.stat-1 {
    left: 0;
    width: 130px;
}

.stat-2 {
    left: 212px;
    width: 75px;
}

.stat-3 {
    left: 369px;
    width: 170px;
}

.stat-divider-1 {
    position: absolute;
    left: 170px;
    top: 48px;
    width: 2px;
    height: 90px;
    background-color: #f8ede3;
    opacity: 0.3;
}

.stat-divider-2 {
    position: absolute;
    left: 327px;
    top: 48px;
    width: 2px;
    height: 90px;
    background-color: #f8ede3;
    opacity: 0.3;
}

@media (max-width: 1023px) {
    .results-section {
        height: auto;
        padding: 3rem 0;
    }
    
    .results-stats {
        margin-top: 2rem;
        justify-content: center;
    }
    
    .stats-container {
        flex-direction: column;
        gap: 2rem;
        width: auto;
    }
    
    .stat {
        align-items: center;
        text-align: center;
        margin-left: 0 !important;
    }
    
    .stat-divider-1,
    .stat-divider-2 {
        display: none;
    }
}



/* Testimonials Stats Section Styling */
.testimonials-stats-frame {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
}

.testimonials-stats-container {
    position: relative;
    width: 355px;
    height: 87px;
    display: flex;
    align-items: center;
}

.testimonial-stat {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.testimonial-stat.stat-1 {
    left: 0;
    width: 105px;
}

.testimonial-stat.stat-2 {
    left: 187px;
    width: 168px;
}

.testimonial-stat-divider {
    position: absolute;
    left: 145px;
    top: 7.5px;
    width: 2px;
    height: 72px;
    background-color: #ddc8b5;
}

.testimonial-stat-label {
    opacity: 0.5;
}

@media (max-width: 1023px) {
    .testimonials-stats-frame {
        margin-top: 2rem;
        justify-content: center;
    }
    
    .testimonials-stats-container {
        flex-direction: row !important;
        gap: 2rem;
        width: auto;
        height: auto;
        justify-content: center;
        align-items: center;
    }
    
    .testimonial-stat {
        align-items: center;
        text-align: center;
        position: relative !important;
        left: auto !important;
    }
    
    .testimonial-stat-divider {
        display: none;
    }
}

/* Carousel Animation */
@keyframes slideInFromRight {
    0% {
        opacity: 0;
        transform: translateX(10px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-10px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInFromRight 0.6s ease-out forwards !important;
}

.slide-in-left {
    animation: slideInFromLeft 0.6s ease-out forwards !important;
}

/* Debug: Make animation more visible for testing */
.slide-in-right,
.slide-in-left {
    will-change: transform, opacity;
}

/* Focus styles for accessibility */
button:focus,
a:focus {
    outline: 2px solid #6f2e1f;
    outline-offset: 2px;
}

/* Ensure proper contrast and readability */
.text-white {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Optimize for mobile performance */
@media (max-width: 768px) {
    .hero-section {
        min-height: 100vh;
        height: auto;
        padding: 2rem 0;
    }
    
    .hero-section button {
        font-size: 16px; /* Better mobile readability */
        padding: 16px 32px; /* 44px minimum height */
        min-height: 44px; /* Guaranteed touch target */
        line-height: 1.2; /* Better text alignment */
        border-radius: 12px; /* Slightly more rounded for mobile */
    }
    
    .hero-bg {
        background-size: cover; /* Cover container without bleeding */
        background-position: center top; /* Better mobile positioning */
        background-repeat: no-repeat;
        overflow: hidden; /* Prevent bleeding outside container */
    }
    
    .hero-section {
        overflow: hidden; /* Prevent background from bleeding outside section */
    }
    
    .hero-section .hero-bg {
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100vw; /* Constrain to viewport width */
        background-size: cover; /* Scale up to fill the container */
    }
    
    .hero-section .relative.z-10 {
        max-width: 100% !important; /* Override 1440px max-width */
        width: 100%;
        margin: 0;
        padding-left: 1rem;
        padding-right: 1rem;
        padding-top: 0 !important;
    }
    
    .why-us-section {
        padding: 3rem 0;
    }
    
    /* Mobile-specific padding for all sections (except hero) */
    .max-w-7xl {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .max-w-4xl {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Mobile testimonials layout - vertical stacking */
    .testimonials-content-frame .flex {
        flex-direction: column !important;
        gap: 2rem !important;
        align-items: center !important;
    }
    
    .testimonials-content-frame .w-\[400px\] {
        width: 100% !important;
        max-width: 400px !important;
    }
    
    .testimonials-content-frame img {
        width: 100% !important;
        height: auto !important;
        max-height: 420px !important;
    }
    
    /* Mobile testimonials headline scaling */
    .testimonials-content-frame h2,
    .bg-\[#f8ede3\] h2,
    .font-archivo.font-\[450\].text-\[64px\] {
        font-size: 2.5rem !important; /* 40px - mobile appropriate */
        line-height: 1.1 !important; /* Better mobile line height */
        width: 100% !important; /* Full width on mobile */
        white-space: normal !important; /* Allow text wrapping */
        margin-bottom: 2rem !important; /* Better mobile spacing */
        padding-left: 0 !important; /* Remove desktop padding */
    }
    
    /* Mobile modal positioning and responsiveness */
    body .modal-overlay {
        align-items: center !important;
        justify-content: center !important;
        padding: 1rem !important;
    }
    
    body .modal-content {
        transform: none !important; /* Remove desktop transform */
        max-height: calc(100vh - 2rem) !important;
        width: calc(100vw - 2rem) !important;
        overflow-y: auto !important; /* Allow scrolling if content is too tall */
        -webkit-overflow-scrolling: touch !important; /* Smooth iOS scrolling */
        padding: 1.5rem !important; /* Reduced padding for mobile */
    }
    
    /* Mobile modal touch targets and sizing */
    body .modal-close {
        min-height: 44px !important; /* Touch-friendly close button */
        min-width: 44px !important;
    }
    
    body .submit-btn {
        min-height: 44px !important; /* Touch-friendly submit button */
        padding: 1rem 1.5rem !important; /* Larger touch area */
    }
    
    body .form-input {
        min-height: 44px !important; /* Touch-friendly input fields */
        font-size: 16px !important; /* Prevent zoom on iOS */
    }
    
    /* Mobile modal typography */
    body .modal-header h2 {
        font-size: 1.5rem !important; /* Smaller title for mobile */
    }
    
    /* Mobile modal spacing */
    body .modal-form {
        gap: 1rem !important; /* Tighter spacing between form elements */
    }
}

/* Mobile Modal Overrides - Highest Priority */
@media (max-width: 768px) {
    /* Complete modal reset and rebuild */
    #modalOverlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        background-color: rgba(0, 0, 0, 0.8) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 1000 !important;
        padding: 1rem !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: opacity 0.3s ease-out, visibility 0.3s ease-out !important;
    }
    
    #modalOverlay.show {
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    #modalContent {
        position: relative !important;
        background-color: #f8ede3 !important;
        width: 100% !important;
        max-width: 350px !important;
        max-height: calc(100vh - 2rem) !important;
        border-radius: 12px !important;
        padding: 1.5rem !important;
        overflow-y: auto !important;
        transform: translateY(40px) scale(0.95) !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        transition: transform 0.3s ease-out !important;
        opacity: 0 !important;
    }
    
    #modalOverlay.show #modalContent {
        transform: translateY(0) scale(1) !important;
        opacity: 1 !important;
    }
    
    #modalContent .modal-close {
        min-height: 44px !important;
        min-width: 44px !important;
    }
    
    #modalContent .submit-btn {
        min-height: 44px !important;
        padding: 1rem 1.5rem !important;
    }
    
    #modalContent .form-input {
        min-height: 44px !important;
        font-size: 16px !important;
    }
    
    #modalContent .modal-header h2 {
        font-size: 1.5rem !important;
    }
    
    #modalContent .modal-form {
        gap: 1rem !important;
    }
}

/* Ensure proper spacing on very small screens */
@media (max-width: 480px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
        line-height: 0.95; /* Adjusted headline spacing */
    }
    
    .hero-section p {
        font-size: 0.9rem;
        line-height: 1.2; /* Tighter subheadline spacing */
    }
    
    .hero-section button {
        line-height: 1; /* Tighter button spacing */
    }
}

/* Why Us Content Frame Styling */
.why-us-content-frame {
    width: 702px;
    height: 268px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Main Content Container */
.why-us-main-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Icon Styling */
.why-us-icon {
    width: 60px;
    height: 60px;
    margin: 40px auto 0;
    display: block;
    transition: opacity 0.8s ease-in-out;
}

/* Content Row Styling */
.why-us-content-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 88px;
    margin-top: 20px;
}

.why-us-nav-btn {
    width: 42px;
    height: 42px;
    border: 2px solid white;
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.why-us-nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.why-us-nav-icon {
    width: 42px;
    height: 42px;
}

/* Text Content Styling */
.why-us-text-content {
    width: 570px;
    text-align: center;
    margin: 0 auto;
}

.why-us-subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 21.78px;
    color: white;
    margin-bottom: 0;
    text-align: center;
    transition: opacity 0.8s ease-in-out;
}

.why-us-description {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 21.78px;
    color: white;
    text-align: center;
    margin-top: 8px;
    transition: opacity 0.8s ease-in-out;
}

/* Responsive adjustments for Why Us section */
@media (max-width: 768px) {
    .why-us-content-frame {
        width: 100% !important;
        height: auto !important;
        padding: 0 1rem;
    }
    
    .why-us-icon {
        width: 50px !important;
        height: 50px !important;
        margin: 20px auto 0 !important;
    }
    
    .why-us-content-row {
        height: auto !important;
        flex-direction: column !important;
        gap: 20px !important;
        margin-top: 20px !important;
        align-items: center !important;
    }
    
    .why-us-text-content {
        width: 100% !important;
        padding: 0 !important;
        order: 2 !important;
        margin-bottom: 20px !important;
    }
    
    .why-us-nav-btn {
        order: 3 !important;
        width: 50px !important;
        height: 50px !important;
        min-height: 44px !important;
        min-width: 44px !important;
        display: inline-flex !important;
        margin: 0 10px !important;
    }
    
    .why-us-nav-icon {
        width: 24px !important;
        height: 24px !important;
    }
    
    .why-us-nav-left {
        order: 1 !important;
    }
    
    .why-us-nav-right {
        order: 2 !important;
    }
    
    .why-us-subtitle {
        font-size: 16px !important;
        line-height: 1.3 !important;
        margin-bottom: 8px !important;
    }
    
    .why-us-description {
        font-size: 14px !important;
        line-height: 1.4 !important;
        margin-top: 8px !important;
    }
}

/* Mobile-specific hero background */
@media (max-width: 768px) {
    .hero-bg {
        background-image: url('assets/hero_bg_mobile.png');
        background-position: center top;
        background-size: cover;
    }
}

