/* Custom styles to ensure smooth scrolling behavior */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}
body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh; /* Ensures content pushes footer down */
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}
main {
    flex-grow: 1; /* Allows main content to take available space */
}

.main-background {
    background-image: url('images/banner1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Custom message box for alerts, replacing window.alert() */
.message-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 2rem;
    border-radius: 0.75rem; /* rounded-lg */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-lg */
    z-index: 1000;
    display: none; /* Hidden by default */
    max-width: 90%;
    text-align: center;
}
.message-box-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none; /* Hidden by default */
}

/* Header logo styles */
.header-logo {
    width: 90px;
    height: 90px;
    object-fit: contain;
}

/* Custom header background color */
.header-bg {
    background-color: #000B6D;
}

/* Hero section background color */
.hero-bg {
    height: 600px; /* Adjust as needed */
    position: relative;
}

#banner-carousel .carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1; /* Default z-index */
}

#banner-carousel .carousel-item.active {
    opacity: 1;
    z-index: 2; /* Active image is on top */
    animation: zoom-in 6s ease-out forwards;
}

/* Language switcher flag button styles */
.lang-btn {
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.lang-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

/* Active language button styles */
.lang-btn.active {
    border-color: #3B82F6;
    background-color: #EFF6FF;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
}

/* Service Card Styles */
.service-card h3 {
    flex-grow: 1;
}

.service-card {
    background-color: #F3F4F6; /* bg-gray-50 */
    border-radius: 0.75rem; /* rounded-xl */
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Align items to the start */
    text-align: left; /* Align text to the left */
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
    transition: background-color 0.7s ease, transform 0.3s ease;
    /* Removed fixed height to allow content to define height */
}

.service-card:hover {
    background-color: #87CEEB; /* sky blue */
    transform: translateY(-5px);
}

.read-more-btn {
    margin-top: auto; /* Pushes the button to the bottom */
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: transparent;
    color: #111827; /* Dark gray text */
    font-weight: 600;
    transition: color 0.3s ease;
    border: none;
    padding: 0;
    cursor: pointer;
    text-decoration: none;
    position: relative; /* Needed for the ::after pseudo-element */
}

.read-more-btn::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #000B6D;
    transition: width 0.3s ease-in-out;
}

.read-more-btn:hover::after {
    width: calc(100% - 28px); /* Adjust width to not underline the icon */
}

.read-more-btn:hover {
    color: #000B6D; /* Dark blue on hover */
}

/* Modal Styles */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: none; /* Controlled by JS */
    opacity: 0;
    transition: opacity 0.35s ease-in-out;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Base transform for centering */
    background-color: white;
    padding: 2.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    display: none; /* Controlled by JS */
    opacity: 0;
    /* Add transition for the pop effect */
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #6B7280;
}

.modal-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #111827;
}

.modal-body ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.modal-body li {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    line-height: 1.6;
}

.modal-body p {
    font-size: 1.1rem;
    line-height: 1.6;
}

@keyframes zoom-in {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.1);
    }
}

/* Hero Text Animation */
.hero-text-container .hero-text-animate {
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.6s ease-out;
    transform: translateX(0);
    opacity: 1;
}

.hero-text-container.hide-text .hero-text-animate {
    transform: translateX(50px);
    opacity: 0;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25D366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.25);
    z-index: 100;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-float:hover {
    transform: translateY(-5px);
    box-shadow: 4px 4px 12px rgba(0,0,0,0.3);
}

.whatsapp-icon {
    width: 60px;
    height: 60px;
}

/* intl-tel-input flag image path fix for CDN usage */
.iti__flag {
    background-image: url("https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.8/img/flags.png");
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .iti__flag {
        background-image: url("https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.8/img/flags@2x.png");
    }
}

/* ===== Success Cases Carousel ===== */
.success-cases-swiper {
    padding-bottom: 50px; /* Space for pagination dots */
    overflow: hidden;
}

.success-case-card {
    background-color: #F3F4F6;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.success-case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Card header with customer name */
.success-case-card .card-header {
    background-color: #000B6D;
    color: white;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.success-case-card .card-header .media-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    opacity: 0.85;
}

.success-case-card .card-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

/* Card body for media content */
.success-case-card .card-body {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Video styling */
.success-case-card video {
    width: 100%;
    border-radius: 0.5rem;
    background-color: #000;
}

/* Audio styling */
.success-case-card .audio-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    padding: 1rem 0;
}

.success-case-card .audio-visual {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #000B6D 0%, #3B82F6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: audio-pulse 2s ease-in-out infinite;
    animation-play-state: paused;
}

.success-case-card .audio-visual.playing {
    animation-play-state: running;
}

.success-case-card .audio-visual svg {
    width: 36px;
    height: 36px;
    fill: white;
}

.success-case-card audio {
    width: 100%;
}

/* Text testimonial styling (ready for future use) */
.success-case-card .testimonial-text {
    font-style: italic;
    font-size: 1rem;
    line-height: 1.7;
    color: #374151;
    border-left: 4px solid #000B6D;
    padding: 0.75rem 1rem;
    margin: 0;
    text-align: left;
    width: 100%;
}

.success-case-card .testimonial-text::before {
    content: '\201C';
    font-size: 2rem;
    color: #000B6D;
    line-height: 0;
    vertical-align: -0.6rem;
    margin-right: 0.25rem;
}

@keyframes audio-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 11, 109, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 12px rgba(0, 11, 109, 0); }
}

/* Swiper navigation overrides */
.success-cases-swiper .swiper-button-prev,
.success-cases-swiper .swiper-button-next {
    color: #000B6D;
    background-color: rgba(255, 255, 255, 0.9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.success-cases-swiper .swiper-button-prev:hover,
.success-cases-swiper .swiper-button-next:hover {
    background-color: white;
    transform: scale(1.1);
}

.success-cases-swiper .swiper-button-prev::after,
.success-cases-swiper .swiper-button-next::after {
    font-size: 18px;
    font-weight: 700;
}

/* Swiper pagination overrides */
.success-cases-swiper .swiper-pagination-bullet {
    background-color: #000B6D;
    opacity: 0.3;
    width: 10px;
    height: 10px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.success-cases-swiper .swiper-pagination-bullet-active {
    opacity: 1;
    transform: scale(1.2);
}

/* Responsive adjustments for carousel cards */
@media (max-width: 640px) {
    .success-cases-swiper .swiper-button-prev,
    .success-cases-swiper .swiper-button-next {
        display: none;
    }
}

/* ===== Hamburger Menu Styles ===== */
.hamburger-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Mobile nav menu transition */
#nav-menu {
    transition: max-height 0.3s ease-in-out;
    overflow: hidden;
}

@media (min-width: 768px) {
    #nav-menu {
        overflow: visible;
        max-height: none !important;
    }
}

/* ===== Mobile Responsive Media Queries ===== */

/* Small screens (max-width: 768px) */
@media (max-width: 768px) {
    /* Header logo scales down */
    .header-logo {
        width: 60px;
        height: 60px;
    }

    /* Hero section responsive height */
    .hero-bg {
        height: auto;
        min-height: 50vh;
    }

    /* Hero text padding */
    .hero-bg .relative.z-20 {
        padding: 2rem 1rem;
    }

    /* Modal adjustments */
    .modal {
        padding: 1.5rem;
        width: 95%;
        max-height: 85vh;
    }

    .modal-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .modal-close-btn {
        font-size: 1.5rem;
        top: 0.75rem;
        right: 0.75rem;
    }

    /* WhatsApp button adjustments */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-icon {
        width: 50px;
        height: 50px;
    }

    /* Audio visual circle */
    .success-case-card .audio-visual {
        width: 60px;
        height: 60px;
    }

    .success-case-card .audio-visual svg {
        width: 28px;
        height: 28px;
    }

    /* Section padding adjustments */
    section {
        border-radius: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Service card text */
    .service-card h3 {
        font-size: 1.25rem;
    }
}

/* Very small screens (max-width: 640px) */
@media (max-width: 640px) {
    /* Hero section compact */
    .hero-bg {
        min-height: 45vh;
    }

    /* Modal tighter spacing */
    .modal {
        padding: 1.25rem;
        width: 96%;
    }

    .modal-title {
        font-size: 1.25rem;
    }

    .modal-body li {
        font-size: 0.9rem;
    }

    .modal-body p {
        font-size: 0.95rem;
    }

    /* Swiper pagination spacing */
    .success-cases-swiper {
        padding-bottom: 40px;
    }

    /* Card header compact */
    .success-case-card .card-header {
        padding: 0.75rem 1rem;
    }

    .success-case-card .card-header h3 {
        font-size: 1rem;
    }

    .success-case-card .card-body {
        padding: 1rem;
    }
}

/* ===== Form Input iOS Zoom Prevention ===== */
@media screen and (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        font-size: 16px !important;
    }

    /* intl-tel-input touch target */
    .iti__flag-container {
        min-height: 44px;
    }

    .iti__selected-flag {
        min-height: 44px;
        padding: 0 8px;
    }
}

/* ===== Touch Device Improvements ===== */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover-only effects on touch devices */
    .service-card:hover {
        transform: none;
    }

    .service-card:active {
        background-color: #87CEEB;
        transform: scale(0.98);
    }

    .success-case-card:hover {
        transform: none;
        box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
    }

    .whatsapp-float:hover {
        transform: none;
    }

    .whatsapp-float:active {
        transform: scale(0.95);
    }

    /* Clean mobile tap highlight */
    a, button, .service-card, .lang-btn, .read-more-btn {
        -webkit-tap-highlight-color: transparent;
    }

    /* Ensure adequate touch targets (min 44px) */
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .lang-btn {
        min-width: 44px;
        min-height: 44px;
    }

    .read-more-btn {
        min-height: 44px;
    }
}

/* ===== Safari / WebKit Compatibility ===== */
@supports (-webkit-touch-callout: none) {
    /* iOS fixed position fix */
    .whatsapp-float {
        position: fixed;
        -webkit-transform: translateZ(0);
    }

    /* Input appearance reset for Safari */
    input[type="text"],
    input[type="email"],
    input[type="tel"] {
        -webkit-appearance: none;
        border-radius: 0.375rem;
    }
}

/* Momentum scrolling for scrollable containers */
.modal {
    -webkit-overflow-scrolling: touch;
}

