/* ===================================
   Ihsan Dhahab - Responsive Stylesheet
   Mobile-First Responsive Design
   =================================== */

/* ===== Extra Large Screens (1400px+) ===== */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-title {
        font-size: 4.5rem;
    }
}

/* ===== Large Screens (1200px - 1399px) ===== */
@media (max-width: 1399px) {
    .container {
        max-width: 1140px;
    }
    
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
        gap: 30px;
    }
}

/* ===== Medium-Large Screens (992px - 1199px) ===== */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    h1 { font-size: 3rem; }
    h2 { font-size: 2.25rem; }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-stats {
        gap: 40px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .nav-link {
        padding: 10px 14px;
        font-size: 0.85rem;
    }
    
    .value-grid {
        gap: 25px;
    }
    
    .ecosystem-wheel {
        height: 550px;
    }
    
    .wheel-item {
        width: 180px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
    }
    
    .footer-contact {
        grid-column: span 2;
    }
    
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== Tablets & Small Laptops (768px - 991px) ===== */
@media (max-width: 991px) {
    .container {
        max-width: 720px;
    }
    
    :root {
        --section-padding: 80px 0;
    }
    
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    
    .section-title {
        font-size: 2.25rem;
    }
    
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 30px 30px;
        gap: 0;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-item {
        width: 100%;
    }
    
    .nav-link {
        color: var(--navy);
        padding: 15px 0;
        border-bottom: 1px solid var(--bg-light);
        width: 100%;
        justify-content: space-between;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 0 0 0 20px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .dropdown.active .dropdown-menu {
        max-height: 500px;
    }
    
    .dropdown-menu li a {
        padding: 10px 0;
        border-bottom: 1px solid var(--bg-light);
    }
    
    .hamburger {
        display: flex;
        z-index: 1001;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .nav-actions .btn {
        display: none;
    }
    
    /* Hero */
    .hero-title {
        font-size: 2.75rem;
    }
    
    .hero-subtitle {
        font-size: 1.15rem;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: 30px;
    }
    
    .stat-item {
        flex: 0 0 calc(50% - 15px);
    }
    
    /* Value Proposition */
    .value-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }
    
    /* Ecosystem Wheel - Convert to List */
    .ecosystem-wheel {
        height: auto;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    
    .wheel-center {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        margin: 0 auto 20px;
    }
    
    .wheel-item {
        position: relative;
        width: 100%;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
    }
    
    .wheel-item a {
        display: flex;
        align-items: center;
        gap: 20px;
        text-align: left;
    }
    
    .wheel-icon {
        margin: 0;
        flex-shrink: 0;
    }
    
    /* Process Timeline */
    .process-timeline::before {
        left: 30px;
    }
    
    .process-step {
        flex-direction: column !important;
        text-align: left !important;
        padding-left: 80px !important;
        padding-right: 0 !important;
    }
    
    .step-number {
        left: 30px !important;
        transform: translateX(-50%);
    }
    
    .step-content {
        padding: 0 !important;
    }
    
    .step-icon {
        display: none;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .stat-card {
        padding: 25px 20px;
    }
    
    .stat-card .stat-value {
        font-size: 2rem;
    }
    
    /* News */
    .news-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    /* Partners */
    .partners-carousel {
        gap: 20px;
    }
    
    .partner-logo {
        padding: 20px 25px;
    }
    
    /* CTA Banner */
    .cta-content h2 {
        font-size: 2rem;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    
    .footer-brand {
        grid-column: span 2;
    }
    
    .footer-contact {
        grid-column: span 1;
    }
    
    /* Content Grid */
    .content-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .content-grid.reverse {
        direction: ltr;
    }
    
    /* Feature Grid */
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Team Grid */
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Timeline */
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item,
    .timeline-item:nth-child(even) {
        padding-left: 100px;
        padding-right: 0;
        text-align: left;
    }
    
    .timeline-year {
        left: 0;
        transform: none;
        width: 60px;
        height: 60px;
        font-size: 0.9rem;
    }
    
    /* Contact Grid */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    /* Document Grid */
    .document-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Page Header */
    .page-header {
        padding: 130px 0 60px;
    }
    
    .page-header h1 {
        font-size: 2.5rem;
    }
}

/* ===== Mobile Landscape & Large Phones (576px - 767px) ===== */
@media (max-width: 767px) {
    .container {
        max-width: 540px;
        padding: 0 15px;
    }
    
    :root {
        --section-padding: 60px 0;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.35rem; }
    h4 { font-size: 1.1rem; }
    
    body {
        font-size: 15px;
    }
    
    .section-title {
        font-size: 1.85rem;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    /* Buttons */
    .btn {
        padding: 10px 22px;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 14px 28px;
    }
    
    /* Header */
    .header {
        padding: 12px 0;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
    
    .logo-icon {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
    
    .nav-menu {
        width: 280px;
    }
    
    /* Hero */
    .hero {
        min-height: auto;
        padding: 120px 0 80px;
    }
    
    .hero-content {
        padding-top: 0;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    .hero-stats {
        gap: 20px;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-scroll {
        display: none;
    }
    
    /* Value Cards */
    .value-card {
        padding: 30px 25px;
    }
    
    .value-icon {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
    }
    
    /* Ecosystem */
    .wheel-center {
        width: 120px;
        height: 120px;
    }
    
    .wheel-center i {
        font-size: 2rem;
    }
    
    .wheel-item a {
        padding: 20px 15px;
    }
    
    .wheel-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    /* Process */
    .process-step {
        padding-left: 60px !important;
        margin-bottom: 30px;
    }
    
    .step-number {
        left: 20px !important;
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .process-timeline::before {
        left: 20px;
    }
    
    /* Stats Dashboard */
    .stats-dashboard {
        padding: 60px 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px 15px;
    }
    
    .stat-card .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
        margin-bottom: 15px;
    }
    
    .stat-card .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-card .stat-title {
        font-size: 0.8rem;
    }
    
    /* News */
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .news-image {
        height: 180px;
    }
    
    .news-content {
        padding: 20px;
    }
    
    .news-content h3 {
        font-size: 1rem;
    }
    
    /* Partners */
    .partners-carousel {
        gap: 15px;
    }
    
    .partner-logo {
        padding: 15px 20px;
        flex: 0 0 calc(50% - 10px);
    }
    
    .partner-logo i {
        font-size: 2rem;
    }
    
    .partner-logo span {
        font-size: 0.75rem;
    }
    
    /* CTA Banner */
    .cta-banner {
        padding: 60px 0;
    }
    
    .cta-content h2 {
        font-size: 1.75rem;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    /* Footer */
    .footer {
        padding-top: 60px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-brand {
        grid-column: span 1;
        text-align: center;
    }
    
    .footer-brand p {
        max-width: 400px;
        margin: 0 auto 20px;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-links,
    .footer-contact {
        grid-column: span 1;
    }
    
    .footer-links h4,
    .footer-contact h4 {
        font-size: 0.95rem;
    }
    
    .footer-legal {
        gap: 15px;
    }
    
    .footer-legal a {
        font-size: 0.8rem;
    }
    
    /* Back to Top */
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
    
    /* Page Header */
    .page-header {
        padding: 110px 0 50px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    /* Features */
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-card {
        padding: 25px 20px;
    }
    
    .feature-card .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    /* Team */
    .team-grid {
        grid-template-columns: 1fr;
        max-width: 350px;
        margin: 0 auto;
    }
    
    /* Timeline */
    .timeline-item,
    .timeline-item:nth-child(even) {
        padding-left: 80px;
    }
    
    .timeline-year {
        width: 50px;
        height: 50px;
        font-size: 0.8rem;
    }
    
    .timeline-content {
        padding: 20px;
    }
    
    /* FAQ */
    .faq-question {
        padding: 15px 20px;
        font-size: 0.95rem;
    }
    
    .faq-answer-content {
        padding: 0 20px 15px;
        font-size: 0.9rem;
    }
    
    /* Documents */
    .document-grid {
        grid-template-columns: 1fr;
    }
    
    .document-card {
        padding: 20px;
    }
    
    .document-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    /* Calculator */
    .calculator-card {
        padding: 30px 25px;
    }
    
    .calc-result .result-value {
        font-size: 1.75rem;
    }
    
    /* Tables */
    .data-table {
        display: block;
        overflow-x: auto;
    }
    
    .data-table th,
    .data-table td {
        padding: 12px 15px;
        font-size: 0.9rem;
        white-space: nowrap;
    }
    
    /* Map */
    .map-container {
        height: 300px;
    }
}

/* ===== Small Phones (< 576px) ===== */
@media (max-width: 575px) {
    .container {
        padding: 0 15px;
    }
    
    :root {
        --section-padding: 50px 0;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .section-tag {
        font-size: 0.75rem;
        padding: 5px 12px;
    }
    
    .section-desc {
        font-size: 0.95rem;
    }
    
    /* Hero */
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-title {
        font-size: 1.85rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .stat-item {
        flex: none;
        width: 100%;
        padding: 15px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: var(--radius-md);
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    /* Value Proposition */
    .value-card {
        padding: 25px 20px;
    }
    
    .value-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        display: flex;
        align-items: center;
        gap: 20px;
        text-align: left;
    }
    
    .stat-card .stat-icon {
        margin: 0;
        flex-shrink: 0;
    }
    
    /* Partners */
    .partners-carousel {
        flex-direction: column;
        align-items: center;
    }
    
    .partner-logo {
        width: 100%;
        max-width: 200px;
        flex-direction: row;
        gap: 15px;
    }
    
    /* CTA */
    .cta-content h2 {
        font-size: 1.5rem;
    }
    
    /* Footer */
    .footer-bottom {
        padding: 20px 0;
    }
    
    .footer-legal {
        flex-direction: column;
        gap: 10px;
    }
    
    /* Contact Info */
    .contact-info-card {
        padding: 30px 25px;
    }
    
    .contact-info-item {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-info-item i {
        margin: 0 auto;
    }
    
    /* Page Header */
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .breadcrumb {
        font-size: 0.85rem;
    }
    
    /* Timeline */
    .timeline-item,
    .timeline-item:nth-child(even) {
        padding-left: 60px;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-year {
        left: 0;
        width: 40px;
        height: 40px;
        font-size: 0.75rem;
    }
}

/* ===== Extra Small Phones (< 375px) ===== */
@media (max-width: 374px) {
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.35rem; }
    
    .hero-title {
        font-size: 1.6rem;
    }
    
    .section-title {
        font-size: 1.4rem;
    }
    
    .btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }
    
    .logo-text {
        font-size: 1.1rem;
    }
    
    .logo-icon {
        width: 32px;
        height: 32px;
        font-size: 0.95rem;
    }
}

/* ===== Touch Device Optimizations ===== */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
    }
    
    .value-card:hover,
    .news-card:hover,
    .feature-card:hover,
    .team-card:hover {
        transform: none;
    }
    
    .dropdown-menu {
        display: none;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
}

/* ===== Print Styles ===== */
@media print {
    .header,
    .footer,
    .back-to-top,
    .hero-scroll,
    .nav-actions,
    .hamburger,
    .cta-banner {
        display: none !important;
    }
    
    .hero {
        min-height: auto;
        padding: 50px 0;
        background: none;
        color: var(--charcoal);
    }
    
    .hero-title,
    .hero-subtitle {
        color: var(--charcoal);
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    h1 { font-size: 24pt; }
    h2 { font-size: 20pt; }
    h3 { font-size: 16pt; }
    
    .section {
        padding: 30px 0;
    }
    
    .page-break {
        page-break-after: always;
    }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ===== High Contrast Mode ===== */
@media (prefers-contrast: high) {
    :root {
        --gold: #B8960C;
        --gold-light: #E5D399;
        --navy: #0A1929;
        --grey: #333333;
    }
    
    .btn-primary {
        border-width: 3px;
    }
    
    a:focus,
    button:focus {
        outline: 3px solid var(--gold);
        outline-offset: 2px;
    }
}

/* ===== Dark Mode Support (Future) ===== */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here if needed */
}
