/* =====================================================
   LIBRE ET PRO - Responsive Styles
   Additional responsive breakpoints and utilities
   ===================================================== */

/* =====================================================
   EXTRA LARGE SCREENS (1400px+)
   ===================================================== */

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }

    .hero-title {
        font-size: 4rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .section-title {
        font-size: 2.75rem;
    }

    .article-card-featured .article-title {
        font-size: 2rem;
    }
}

/* =====================================================
   DESKTOP (1200px - 1399px)
   ===================================================== */

@media (min-width: 1200px) and (max-width: 1399px) {
    .container {
        max-width: 1140px;
    }
}

/* =====================================================
   TABLET LANDSCAPE (992px - 1199px)
   ===================================================== */

@media (min-width: 992px) and (max-width: 1199px) {
    .container {
        max-width: 960px;
    }

    .hero-grid {
        gap: var(--spacing-lg);
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =====================================================
   TABLET PORTRAIT (768px - 991px)
   ===================================================== */

@media (min-width: 768px) and (max-width: 991px) {
    .container {
        max-width: 720px;
    }

    :root {
        --spacing-xxl: 64px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-subtitle {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        max-width: 500px;
        margin: 0 auto;
    }

    .featured-grid {
        grid-template-columns: 1fr;
    }

    .featured-secondary {
        flex-direction: row;
    }

    .portrait-wrapper {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .story-grid {
        grid-template-columns: 1fr;
    }

    .page-hero-split {
        grid-template-columns: 1fr;
    }

    .hero-split-content {
        padding: var(--spacing-xl);
    }

    .article-nav-grid {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   MOBILE LARGE (576px - 767px)
   ===================================================== */

@media (min-width: 576px) and (max-width: 767px) {
    .container {
        max-width: 540px;
    }

    :root {
        --spacing-xxl: 56px;
    }

    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .tips-grid {
        grid-template-columns: 1fr;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .mission-pillars {
        grid-template-columns: 1fr;
    }

    .values-grid {
        grid-template-columns: 1fr;
    }

    .featured-secondary {
        flex-direction: column;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .article-card-horizontal {
        flex-direction: column;
    }

    .article-card-horizontal .article-image-wrapper {
        width: 100%;
    }
}

/* =====================================================
   MOBILE SMALL (below 576px)
   ===================================================== */

@media (max-width: 575px) {
    .container {
        padding-left: var(--spacing-sm);
        padding-right: var(--spacing-sm);
    }

    :root {
        --spacing-xxl: 48px;
        --spacing-xl: 32px;
        --spacing-lg: 24px;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .hero-title {
        font-size: 1.875rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .hero-stats {
        gap: var(--spacing-md);
    }

    .stat-number {
        font-size: 1.25rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .section-header {
        text-align: center;
    }

    .section-header .btn {
        align-self: center;
    }

    .category-card {
        padding: var(--spacing-md);
    }

    .tip-card {
        padding: var(--spacing-md);
    }

    .portrait-image-side {
        padding: var(--spacing-lg);
    }

    .portrait-image {
        width: 150px;
        height: 150px;
    }

    .portrait-content-side {
        padding: var(--spacing-lg);
    }

    .portrait-name {
        font-size: 1.25rem;
    }

    .portrait-quote {
        font-size: 1rem;
    }

    .testimonial-card {
        padding: var(--spacing-md);
    }

    .newsletter-wrapper {
        padding: 0 var(--spacing-sm);
    }

    .newsletter-icon {
        width: 64px;
        height: 64px;
    }

    .newsletter-icon svg {
        width: 28px;
        height: 28px;
    }

    .form-group-inline {
        flex-direction: column;
    }

    .form-group-inline .btn {
        width: 100%;
    }

    .newsletter-banner-wrapper {
        flex-direction: column;
        text-align: center;
    }

    .newsletter-banner-content {
        flex-direction: column;
    }

    .newsletter-banner-form {
        flex-direction: column;
        width: 100%;
    }

    .newsletter-banner-form input {
        width: 100%;
    }

    .filters-wrapper {
        flex-direction: column;
    }

    .filters-categories {
        overflow-x: auto;
        padding-bottom: var(--spacing-xs);
        flex-wrap: nowrap;
    }

    .filter-btn {
        white-space: nowrap;
    }

    .filters-search {
        flex-direction: column;
    }

    .filters-search .search-input-wrapper {
        width: 100%;
    }

    .filters-search .sort-select {
        width: 100%;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .pagination-btn span {
        display: none;
    }

    .pagination-numbers {
        order: -1;
        width: 100%;
        justify-content: center;
        margin-bottom: var(--spacing-sm);
    }

    .article-single-title {
        font-size: 1.5rem;
    }

    .article-single-meta {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .author-info {
        width: 100%;
    }

    .meta-info {
        width: 100%;
        justify-content: flex-start;
    }

    .article-content-wrapper {
        font-size: 1rem;
    }

    .article-content-wrapper h2 {
        font-size: 1.375rem;
    }

    .article-intro {
        font-size: 1.125rem;
    }

    .article-quote {
        font-size: 1rem;
        padding: var(--spacing-md);
    }

    .article-callout {
        flex-direction: column;
        padding: var(--spacing-md);
    }

    .author-bio-card {
        flex-direction: column;
    }

    .author-bio-avatar {
        width: 100px;
        height: 100px;
    }

    .comment {
        flex-direction: column;
    }

    .comment-avatar {
        width: 40px;
        height: 40px;
    }

    .article-nav-link {
        padding: var(--spacing-sm);
    }

    .article-nav-title {
        font-size: 0.875rem;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .team-image {
        width: 120px;
        height: 120px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }

    .stat-card .stat-number {
        font-size: 2rem;
    }

    .mission-quote {
        font-size: 1.125rem;
    }

    .contact-form-wrapper {
        padding: var(--spacing-md);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-contact {
        justify-content: center;
    }

    .footer-contact li {
        justify-content: center;
    }

    .footer-newsletter-form {
        flex-direction: column;
    }

    .footer-legal {
        flex-direction: column;
        gap: var(--spacing-xs);
    }

    .breadcrumb {
        font-size: 0.75rem;
    }

    .legal-table {
        font-size: 0.875rem;
    }

    .legal-table th,
    .legal-table td {
        padding: var(--spacing-xs);
    }
}

/* =====================================================
   TOUCH DEVICE OPTIMIZATIONS
   ===================================================== */

@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .article-card:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
    }

    .category-card:hover {
        transform: none;
    }

    .btn:hover {
        transform: none;
    }

    /* Increase tap targets */
    .nav-link {
        padding: var(--spacing-sm);
    }

    .filter-btn {
        padding: var(--spacing-sm) var(--spacing-md);
        min-height: 44px;
    }

    .pagination-number {
        width: 44px;
        height: 44px;
    }

    /* Remove hover-based animations */
    .article-card:hover .article-image {
        transform: none;
    }
}

/* =====================================================
   PRINT STYLES
   ===================================================== */

@media print {
    .site-header,
    .site-footer,
    .nav-menu,
    .hero-section,
    .newsletter-section,
    .comments-section,
    .article-navigation,
    .related-articles-section,
    .btn {
        display: none !important;
    }

    .main-content {
        padding-top: 0;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: black;
        background: white;
    }

    a {
        color: black;
        text-decoration: underline;
    }

    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        color: black;
    }

    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }

    .article-body {
        max-width: 100%;
        padding: 0;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }
}

/* =====================================================
   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;
    }

    .fade-in-section {
        opacity: 1;
        transform: none;
    }
}

/* =====================================================
   DARK MODE PREFERENCE (Optional)
   ===================================================== */

@media (prefers-color-scheme: dark) {
    /*
    Uncomment below to enable automatic dark mode

    :root {
        --color-bg-light: #1a1f23;
        --color-bg-alt: #252b30;
        --color-bg-white: #141618;
        --color-text-dark: #f5f3ef;
        --color-text-light: #9ca3a7;
        --color-border: #3a4045;
    }

    body {
        background-color: var(--color-bg-white);
        color: var(--color-text-dark);
    }
    */
}

/* =====================================================
   HIGH CONTRAST MODE
   ===================================================== */

@media (prefers-contrast: high) {
    :root {
        --color-primary: #0F1C21;
        --color-secondary: #9E4A2E;
        --color-text-light: #2D3436;
        --color-border: #1A2E35;
    }

    .btn-primary {
        border: 2px solid #0F1C21;
    }

    .article-card,
    .category-card,
    .testimonial-card {
        border: 2px solid #1A2E35;
    }
}

/* =====================================================
   LANDSCAPE ORIENTATION ON MOBILE
   ===================================================== */

@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        padding: var(--spacing-lg) 0;
    }

    .hero-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-md);
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-buttons {
        flex-direction: row;
    }

    .hero-visual {
        display: none;
    }
}
