/* Mensken Pharma - Responsive Stylesheet */
/* Mobile-First Responsive Design */

/* Extra Small Devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    /* Typography */
    :root {
        --font-size-5xl: 2.5rem;
        --font-size-6xl: 3rem;
        --font-size-4xl: 2rem;
        --font-size-3xl: 1.5rem;
    }
    
    /* Container */
    .container {
        padding: 0 var(--spacing-md);
    }
    
    /* Header */
    .navbar-brand {
        font-size: var(--font-size-lg);
    }
    
    .brand-logo i {
        font-size: var(--font-size-lg);
    }
    
    .navbar-nav {
        text-align: center;
        padding: var(--spacing-md) 0;
    }
    
    .navbar-nav .nav-link {
        padding: var(--spacing-sm) 0;
        font-size: var(--font-size-lg);
    }
    
    /* Hero Section */
    .hero {
        padding: var(--spacing-2xl) 0;
        min-height: auto;
    }
    
    .hero-title {
        font-size: var(--font-size-4xl);
        margin-bottom: var(--spacing-sm);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-xl);
        margin-bottom: var(--spacing-md);
    }
    
    .hero-description {
        font-size: var(--font-size-base);
        margin-bottom: var(--spacing-xl);
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: var(--spacing-md);
        align-items: stretch;
    }
    
    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-card {
        padding: var(--spacing-xl) var(--spacing-lg);
        margin-top: var(--spacing-xl);
    }
    
    .hero-card i {
        font-size: var(--font-size-3xl);
    }
    
    .hero-card h3 {
        font-size: var(--font-size-lg);
    }
    
    /* Value Blocks */
    .value-blocks {
        padding: var(--spacing-xl) 0;
    }
    
    .value-card {
        padding: var(--spacing-lg);
        margin-bottom: var(--spacing-lg);
    }
    
    .value-icon {
        width: 60px;
        height: 60px;
        font-size: var(--font-size-lg);
    }
    
    /* Therapeutic Segments */
    .therapeutic-segments {
        padding: var(--spacing-xl) 0;
    }
    
    .section-header h2 {
        font-size: var(--font-size-3xl);
    }
    
    .section-header p {
        font-size: var(--font-size-base);
    }
    
    .segment-card {
        padding: var(--spacing-lg);
        margin-bottom: var(--spacing-lg);
    }
    
    .segment-icon {
        width: 50px;
        height: 50px;
        font-size: var(--font-size-lg);
    }
    
    /* Featured Products */
    .featured-products {
        padding: var(--spacing-xl) 0;
    }
    
    .product-card {
        margin-bottom: var(--spacing-lg);
    }
    
    .product-image {
        height: 150px;
    }
    
    .product-info {
        padding: var(--spacing-md);
    }
    
    /* Carousel */
    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        height: 40px;
    }
    
    .carousel-control-prev {
        left: -20px;
    }
    
    .carousel-control-next {
        right: -20px;
    }
    
    /* Presence Banner */
    .presence-banner {
        padding: var(--spacing-xl) 0;
        text-align: center;
    }
    
    .presence-content h2 {
        font-size: var(--font-size-3xl);
    }
    
    .presence-content p {
        font-size: var(--font-size-base);
    }
    
    .presence-stats {
        flex-direction: column;
        gap: var(--spacing-lg);
        margin-top: var(--spacing-lg);
    }
    
    .stat-number {
        font-size: var(--font-size-3xl);
    }
    
    /* Logos Section */
    .logos-section {
        padding: var(--spacing-lg) 0;
    }
    
    .logo-item {
        margin-bottom: var(--spacing-lg);
    }
    
    .logo-item img {
        height: 40px;
    }
    
    /* Footer */
    .footer {
        padding: var(--spacing-xl) 0 var(--spacing-lg);
        text-align: center;
    }
    
    .footer-brand {
        margin-bottom: var(--spacing-xl);
    }
    
    .footer h5 {
        margin-top: var(--spacing-lg);
        margin-bottom: var(--spacing-md);
    }
    
    .footer-links {
        margin-bottom: var(--spacing-lg);
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }
    
    .contact-item i {
        margin-top: 0;
    }
    
    .footer .footer-links {
        flex-direction: column;
        gap: var(--spacing-md);
        justify-content: center;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Hero Section */
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }
    
    .hero-buttons .btn {
        flex: 1;
        max-width: 200px;
    }
    
    /* Value Blocks */
    .value-card {
        margin-bottom: var(--spacing-lg);
    }
    
    /* Therapeutic Segments */
    .segment-card {
        margin-bottom: var(--spacing-lg);
    }
    
    /* Featured Products */
    .product-card {
        margin-bottom: var(--spacing-lg);
    }
    
    /* Presence Banner */
    .presence-stats {
        justify-content: center;
    }
    
    /* Footer */
    .footer .footer-links {
        justify-content: center;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Hero Section */
    .hero-content {
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    /* Value Blocks */
    .value-card {
        margin-bottom: var(--spacing-lg);
    }
    
    /* Therapeutic Segments */
    .segment-card {
        margin-bottom: var(--spacing-lg);
    }
    
    /* Featured Products */
    .product-card {
        margin-bottom: var(--spacing-lg);
    }
    
    /* Presence Banner */
    .presence-content {
        text-align: center;
        margin-bottom: var(--spacing-lg);
    }
    
    .presence-stats {
        justify-content: center;
    }
    
    /* Footer */
    .footer-content {
        text-align: center;
    }
    
    .contact-item {
        justify-content: center;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Hero Section */
    .hero-content {
        padding-right: var(--spacing-xl);
    }
    
    /* Value Blocks */
    .value-card {
        height: 100%;
    }
    
    /* Therapeutic Segments */
    .segment-card {
        height: 100%;
    }
    
    /* Featured Products */
    .product-card {
        height: 100%;
    }
    
    /* Presence Banner */
    .presence-content {
        padding-right: var(--spacing-xl);
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    /* Container */
    .container {
        max-width: 1200px;
    }
    
    /* Hero Section */
    .hero-content {
        padding-right: var(--spacing-2xl);
    }
    
    /* Presence Banner */
    .presence-content {
        padding-right: var(--spacing-2xl);
    }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 500px) {
    .hero {
        min-height: auto;
        padding: var(--spacing-xl) 0;
    }
    
    .hero-title {
        font-size: var(--font-size-3xl);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-xl);
    }
    
    .hero-description {
        font-size: var(--font-size-sm);
        margin-bottom: var(--spacing-lg);
    }
    
    .hero-buttons {
        flex-direction: row;
        gap: var(--spacing-md);
    }
    
    .hero-card {
        padding: var(--spacing-lg);
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure crisp images on retina displays */
    .hero-card i,
    .value-icon,
    .segment-icon {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* 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;
    }
    
    .hero-card {
        animation: none;
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
    
    .value-card:hover,
    .segment-card:hover,
    .product-card:hover {
        transform: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #F8FAFC;
        --text-secondary: #CBD5E1;
        --neutral-white: #0F172A;
        --neutral-light: #1E293B;
    }
    
    body {
        background-color: var(--neutral-white);
        color: var(--text-primary);
    }
    
    .header {
        background: var(--neutral-light);
        border-bottom: 1px solid var(--neutral-medium);
    }
    
    .value-blocks,
    .therapeutic-segments,
    .featured-products {
        background: var(--neutral-light);
    }
    
    .value-card,
    .segment-card,
    .product-card {
        background: var(--neutral-white);
        border-color: var(--neutral-medium);
    }
    
    .logos-section {
        background: var(--neutral-light);
    }
}

/* Print Styles */
@media print {
    /* Hide navigation and interactive elements */
    .header,
    .footer,
    .btn,
    .carousel-control-prev,
    .carousel-control-next,
    .carousel-indicators {
        display: none !important;
    }
    
    /* Optimize for printing */
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    .hero {
        background: none !important;
        color: #000 !important;
        min-height: auto;
        padding: 1rem 0;
    }
    
    .hero-title,
    .hero-subtitle,
    .hero-description {
        color: #000 !important;
    }
    
    .value-blocks,
    .therapeutic-segments,
    .featured-products {
        background: #fff !important;
    }
    
    .value-card,
    .segment-card,
    .product-card {
        background: #fff !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        break-inside: avoid;
    }
    
    /* Page breaks */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    .value-card,
    .segment-card,
    .product-card {
        page-break-inside: avoid;
    }
    
    /* Links */
    a {
        color: #000 !important;
        text-decoration: underline;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}

/* Focus Management for Keyboard Navigation */
@media (prefers-reduced-motion: no-preference) {
    .btn:focus,
    .nav-link:focus,
    .form-control:focus {
        outline: 2px solid var(--accent-info);
        outline-offset: 2px;
        transition: outline 0.2s ease;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-gradient-start: #000000;
        --primary-gradient-end: #0000FF;
        --text-primary: #000000;
        --text-secondary: #333333;
        --neutral-white: #FFFFFF;
        --neutral-light: #F0F0F0;
    }
    
    .btn-primary {
        background: #000000;
        color: #FFFFFF;
        border: 2px solid #000000;
    }
    
    .btn-outline-primary {
        background: #FFFFFF;
        color: #000000;
        border: 2px solid #000000;
    }
    
    .value-card,
    .segment-card,
    .product-card {
        border: 2px solid #000000;
    }
}

/* Container Queries (Future-proofing) */
@container (max-width: 400px) {
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    .carousel {
        animation: none;
    }
    
    .carousel-item {
        transition: none;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        padding: var(--spacing-md);
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        min-height: 44px;
        min-width: 44px;
    }
    
    .carousel-indicators [data-bs-target] {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Specific Device Optimizations */
/* iPhone SE and similar small screens */
@media (max-width: 375px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
    
    .value-card,
    .segment-card {
        padding: var(--spacing-md);
    }
    
    .product-info {
        padding: var(--spacing-sm);
    }
}

/* iPad and similar tablets */
@media (min-width: 768px) and (max-width: 1024px) {
    .hero-title {
        font-size: var(--font-size-5xl);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-2xl);
    }
    
    .hero-description {
        font-size: var(--font-size-lg);
    }
    
    .value-card,
    .segment-card,
    .product-card {
        margin-bottom: var(--spacing-lg);
    }
}

/* Large Desktop Screens */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-title {
        font-size: var(--font-size-6xl);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-4xl);
    }
    
    .section-header h2 {
        font-size: var(--font-size-5xl);
    }
}
