/* ============================================
   Why Us Page Styles
   ============================================ */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --transition-base: all 0.3s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Hero Section */
.why-us-hero {
    position: relative;
    /* padding: 40px 20px; */
    display: flex;
    align-items: center;
    justify-content: center;
}

.why-us-hero .container {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    border-radius: 12px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    opacity: 1;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
    padding: 0 20px;
    animation: fadeInUp 0.8s ease-out;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 2px 4px rgba(197, 191, 191, 0.1);
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    opacity: 0.95;
    color: white;
}

/* Container */
.why-us-hero .container,
.why-us-header .container,
.why-us-item-section .container,
.cta-section .container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    width: 100% !important;
}

/* Section Header */
.why-us-header {
    padding: 60px 0 40px;
    background-color: var(--bg-light);
}

.section-header {
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100%;
}

/* Why Us Item Sections */
.why-us-item-section {
    padding: 60px 0;
}

.why-us-item-section.bg-white {
    background: #ffffff;
}

.why-us-item-section.bg-light {
    background: #f8f9fa;
}

.why-us-item-content {
    display: flex;
    gap: 30px;
    align-items: start;
    flex-wrap: wrap;
}

/* Better approach using flexbox for dynamic content */
.why-us-item-content > * {
    flex-shrink: 0;
}

/* When using grid (for browsers that support :has()) */
@supports selector(:has(*)) {
    .why-us-item-content {
        display: grid;
        gap: 30px;
        align-items: start;
    }
    
    /* Default: all 3 elements present */
    .why-us-item-content:has(.item-icon):has(.item-media) {
        grid-template-columns: 80px minmax(300px, 1fr) auto;
    }

    /* When no icon, adjust grid to only 2 columns */
    .why-us-item-content:not(:has(.item-icon)):has(.item-media) {
        grid-template-columns: minmax(300px, 1fr) auto;
    }

    /* When no icon and no media, single column */
    .why-us-item-content:not(:has(.item-icon)):not(:has(.item-media)) {
        grid-template-columns: 1fr;
    }

    /* When icon but no media */
    .why-us-item-content:has(.item-icon):not(:has(.item-media)) {
        grid-template-columns: 80px minmax(300px, 1fr);
    }
}

/* Item Icon */
.item-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Item Text */
.item-text {
    flex: 1 1 300px;
    min-width: 300px;
    max-width: 100%;
}

@supports selector(:has(*)) {
    .item-text {
        flex: 1;
        min-width: 0;
        width: 100%;
        max-width: 100%;
    }
}

.item-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 15px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.item-description {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-light);
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    width: 100%;
    max-width: 100%;
}

/* Item Media */
.item-media {
    min-width: 150px;
}

.media-trigger {
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.media-trigger:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.media-trigger:active {
    transform: scale(0.98);
}

.play-icon,
.image-icon {
    width: 24px;
    height: 24px;
}

/* No Content */
.no-content {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.no-content p {
    font-size: 1.125rem;
    color: var(--text-light);
}

/* Media Modal */
.media-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.media-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
}

.modal-container {
    position: relative;
    z-index: 10000;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    animation: scaleIn 0.3s ease-out;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
    z-index: 10001;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.modal-close svg {
    width: 24px;
    height: 24px;
}

.modal-content {
    padding: 40px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 20px;
    text-align: center;
}

.modal-media {
    width: 100%;
}

.modal-media img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.modal-media video {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.modal-media iframe {
    width: 100%;
    height: 500px;
    border: none;
    border-radius: 8px;
}

/* CTA Section */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.cta-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-description {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Custom CTA Button Styles */
.cta-btn {
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition-base);
    display: inline-block;
    cursor: pointer;
    border: 2px solid transparent;
}

.cta-btn-solid {
    background: var(--white);
    color: var(--primary-color);
    border-color: var(--white);
}

.cta-btn-solid:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: var(--bg-light);
}

.cta-btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.cta-btn-outline:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-description {
        font-size: 1rem;
    }

    .why-us-header {
        padding: 40px 0 30px;
    }

    .why-us-item-section {
        padding: 40px 0;
    }

    .why-us-item-content {
        flex-direction: column;
        gap: 20px;
    }
    
    @supports selector(:has(*)) {
        .why-us-item-content {
            grid-template-columns: 1fr;
        }
    }
    
    .item-text {
        min-width: 100%;
    }

    .item-icon {
        margin: 0 auto;
    }

    .item-title {
        font-size: 1.5rem;
        text-align: center;
    }

    .item-description {
        text-align: center;
    }

    .item-media {
        width: 100%;
    }

    .cta-title {
        font-size: 1.75rem;
    }

    .cta-description {
        font-size: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    .modal-content {
        padding: 20px;
    }

    .modal-media iframe {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .why-us-hero {
        padding: 20px 10px;
    }

    .why-us-hero .container {
        min-height: 300px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .why-us-header {
        padding: 30px 0 20px;
    }

    .why-us-item-section {
        padding: 30px 0;
    }

    .item-title {
        font-size: 1.25rem;
    }

    .item-description {
        font-size: 0.95rem;
    }

    .cta-section {
        padding: 40px 0;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .why-us-hero,
    .cta-section,
    .media-trigger,
    .modal-close {
        display: none;
    }

    .why-us-item-section {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

