/* ============================================
   FILE: public/assets/css/responsive.css
   Responsive Design Styles
============================================ */
/* ========================================
   Responsive CSS for Finkele Website
   Climate Risk Intelligence Platform
   ======================================== */

/* ========================================
   BREAKPOINTS:
   - Desktop: > 1200px
   - Laptop: 993px - 1200px  
   - Tablet: 769px - 992px
   - Mobile: <= 768px
   - Small Mobile: <= 480px
   ======================================== */

/* ========================================
   DESKTOP FIRST APPROACH
   Default styles are for desktop
   ======================================== */

/* ========================================
   LAPTOP: 993px - 1200px
   ======================================== */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
        padding: 0 20px;
    }
    
    .hero-section h1 {
        font-size: 3rem;
    }
    
    .hero-section p {
        font-size: 1.2rem;
    }
    
    /* Service cards in 2x2 grid */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Stats section adjustments */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* ========================================
   TABLET: 769px - 992px
   ======================================== */
@media (min-width: 769px) and (max-width: 992px) {
    .container {
        max-width: 720px;
        padding: 0 15px;
    }
    
    /* Navigation adjustments */
    .navbar {
        padding: 1rem 0;
    }
    
    .nav-menu {
        gap: 1.5rem;
    }
    
    /* Hero section */
    .hero-section {
        padding: 4rem 0;
        min-height: 70vh;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-section p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    /* Blog grid - 2 columns on tablet */
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* Services grid - 2 columns */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* Features grid - 2 columns */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* Team grid - 2 columns */
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    /* Experience timeline stays single column */
    .experience-timeline {
        max-width: 600px;
        margin: 0 auto;
    }
    
    /* Footer adjustments */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* ========================================
   MOBILE: <= 768px
   ======================================== */
@media (max-width: 768px) {
    /* Container */
    .container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    /* Typography scaling */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    /* Navigation - Mobile Menu */
    .navbar {
        padding: 0.75rem 0;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        margin: 1rem 0;
    }
    
    .hamburger {
        display: block;
        cursor: pointer;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    /* Hero Section */
    .hero-section {
        padding: 3rem 0;
        min-height: 60vh;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-section p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
    
    /* Blog Grid - Single column on mobile */
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .blog-card {
        margin-bottom: 1rem;
    }
    
    /* Services Grid - Single column */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    /* Features Grid - Single column */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Stats Grid - 2x2 on mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    /* Team Grid - Single column */
    .team-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Experience Timeline */
    .experience-timeline {
        padding-left: 20px;
    }
    
    .timeline-item {
        padding-left: 30px;
    }
    
    .timeline-item::before {
        left: -8px;
    }
    
    /* Tables - Make responsive */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    /* Forms */
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-row .form-group {
        width: 100%;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        width: 100%;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Buttons */
    .btn-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn {
        width: 100%;
        padding: 0.75rem 1.5rem;
    }
    
    /* Modal */
    .modal-content {
        margin: 10px;
        width: calc(100% - 20px);
        max-height: calc(100vh - 20px);
        overflow-y: auto;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    /* Utility Classes */
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: block !important;
    }
    
    /* Padding/Margin Adjustments */
    .section {
        padding: 3rem 0;
    }
    
    .section-title {
        margin-bottom: 2rem;
    }
    
    /* Images */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Climate Dashboard Specific */
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        min-height: 250px;
    }
    
    .risk-matrix {
        overflow-x: auto;
    }
    
    /* Map Container */
    .map-container {
        height: 300px;
    }
}

/* ========================================
   SMALL MOBILE: <= 480px
   ======================================== */
@media (max-width: 480px) {
    /* Container */
    .container {
        padding: 0 10px;
    }
    
    /* Typography */
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    body {
        font-size: 14px;
    }
    
    /* Hero Section */
    .hero-section {
        padding: 2rem 0;
        min-height: 50vh;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .hero-section p {
        font-size: 0.95rem;
    }
    
    /* Stats Grid - Single column on very small screens */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    /* Cards */
    .card {
        padding: 1rem;
    }
    
    /* Buttons */
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    /* Forms */
    label {
        font-size: 0.875rem;
    }
    
    /* Section spacing */
    .section {
        padding: 2rem 0;
    }
    
    /* Footer */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-bottom {
        padding: 1rem 0;
        font-size: 0.75rem;
    }
}

/* ========================================
   LANDSCAPE ORIENTATION ADJUSTMENTS
   ======================================== */
@media (max-height: 600px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    /* Hide non-essential elements */
    .navbar,
    .hamburger,
    .footer,
    .btn-scroll-top,
    .social-links,
    .video-background,
    .hero-buttons {
        display: none !important;
    }
    
    /* Adjust layout for print */
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: white;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .section {
        page-break-inside: avoid;
        padding: 1rem 0;
    }
    
    /* Ensure images print properly */
    img {
        max-width: 100%;
        page-break-inside: avoid;
    }
    
    /* Links */
    a {
        color: #000;
        text-decoration: underline;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
    
    /* Headers */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
}

/* ========================================
   ACCESSIBILITY & PERFORMANCE
   ======================================== */

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

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }
    
    .card {
        border: 1px solid currentColor;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --text-color: #e0e0e0;
        --card-bg: #2a2a2a;
        --border-color: #404040;
    }
    
    body {
        background-color: var(--bg-color);
        color: var(--text-color);
    }
    
    .card {
        background-color: var(--card-bg);
        border-color: var(--border-color);
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Display utilities */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }

/* Responsive display utilities */
@media (max-width: 768px) {
    .d-md-none { display: none !important; }
    .d-md-block { display: block !important; }
    .d-md-flex { display: flex !important; }
}

@media (max-width: 480px) {
    .d-sm-none { display: none !important; }
    .d-sm-block { display: block !important; }
    .d-sm-flex { display: flex !important; }
}

/* Text alignment */
@media (max-width: 768px) {
    .text-md-center { text-align: center !important; }
    .text-md-left { text-align: left !important; }
    .text-md-right { text-align: right !important; }
}

/* Margin/Padding utilities */
@media (max-width: 768px) {
    .mt-md-0 { margin-top: 0 !important; }
    .mb-md-0 { margin-bottom: 0 !important; }
    .pt-md-0 { padding-top: 0 !important; }
    .pb-md-0 { padding-bottom: 0 !important; }
}