/**
 * Homepage Content Sections CSS
 * Includes dark mode support and mobile responsiveness
 * Link this file in your header: <link rel="stylesheet" href="assets/css/homepage-content.css">
 */

/* ============================================
   LIGHT MODE (Default)
   ============================================ */

/* Main Content Sections */
.homepage-intro,
.why-notam-viewer,
.what-are-notams,
.how-to-use,
.popular-countries,
.recent-articles,
.safety-disclaimer {
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background 0.3s, box-shadow 0.3s;
}

/* Section Headings */
.homepage-intro h2,
.why-notam-viewer h2,
.what-are-notams h2,
.how-to-use h2,
.popular-countries h2,
.recent-articles h2,
.safety-disclaimer h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 600;
    transition: color 0.3s;
}

/* Intro Section */
.homepage-intro p {
    line-height: 1.8;
    color: #555555;
    margin-bottom: 15px;
    font-size: 16px;
    transition: color 0.3s;
}

/* ============================================
   FEATURE GRID (Why Use NOTAM Viewer)
   ============================================ */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.feature {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    transition: all 0.3s;
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.2);
}

.feature h3 {
    color: #2c3e50;
    margin-bottom: 12px;
    font-size: 20px;
    font-weight: 600;
    transition: color 0.3s;
}

.feature p {
    color: #666666;
    line-height: 1.6;
    font-size: 15px;
    transition: color 0.3s;
}

/* ============================================
   WHAT ARE NOTAMS (List Styling)
   ============================================ */

.what-are-notams ul {
    list-style: none;
    padding-left: 0;
    margin: 20px 0;
}

.what-are-notams li {
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
    line-height: 1.7;
    color: #555555;
    transition: color 0.3s;
}

.what-are-notams li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
    font-size: 18px;
}

.what-are-notams strong {
    color: #2c3e50;
    transition: color 0.3s;
}

.what-are-notams p {
    line-height: 1.8;
    color: #555555;
    margin-bottom: 15px;
    transition: color 0.3s;
}

/* ============================================
   HOW TO USE (Numbered List)
   ============================================ */

.how-to-use ol {
    counter-reset: item;
    list-style: none;
    padding-left: 0;
    margin: 20px 0;
}

.how-to-use li {
    counter-increment: item;
    margin-bottom: 20px;
    padding-left: 50px;
    position: relative;
    line-height: 1.7;
    color: #555555;
    transition: color 0.3s;
}

.how-to-use li:before {
    content: counter(item);
    position: absolute;
    left: 0;
    top: 0;
    background: #3498db;
    color: #ffffff;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
}

.how-to-use strong {
    color: #2c3e50;
    transition: color 0.3s;
}

.how-to-use p {
    line-height: 1.7;
    color: #555555;
    margin-bottom: 15px;
    transition: color 0.3s;
}

/* ============================================
   POPULAR COUNTRIES
   ============================================ */

.popular-countries p {
    line-height: 1.7;
    color: #555555;
    margin-bottom: 15px;
    transition: color 0.3s;
}

.country-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 25px 0;
}

.country-links .region {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-top: 3px solid #3498db;
    transition: all 0.3s;
}

.country-links .region:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.country-links h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #ecf0f1;
    transition: color 0.3s, border-color 0.3s;
}

.country-links a {
    display: block;
    padding: 10px 15px;
    color: #3498db;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s;
    margin-bottom: 8px;
    background: #ffffff;
    border: 1px solid #ecf0f1;
    font-size: 15px;
}

.country-links a:hover {
    background: #3498db;
    color: #ffffff;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.view-all-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 24px;
    background: #3498db;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 16px;
}

.view-all-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

/* ============================================
   RECENT ARTICLES
   ============================================ */

.recent-articles p {
    line-height: 1.7;
    color: #555555;
    margin-bottom: 15px;
    transition: color 0.3s;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 25px 0;
}

.article-grid article {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-top: 3px solid #3498db;
    transition: all 0.3s;
}

.article-grid article:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.article-grid h3 {
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 600;
}

.article-grid h3 a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s;
}

.article-grid h3 a:hover {
    color: #3498db;
}

.article-grid p {
    color: #666666;
    line-height: 1.6;
    font-size: 14px;
    margin: 0;
    transition: color 0.3s;
}

/* ============================================
   SAFETY DISCLAIMER
   ============================================ */

.safety-disclaimer {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    transition: background 0.3s, border-color 0.3s;
}

.safety-disclaimer p {
    color: #856404;
    line-height: 1.7;
    margin-bottom: 15px;
    transition: color 0.3s;
}

.safety-disclaimer p:last-child {
    margin-bottom: 0;
}

.safety-disclaimer a {
    color: #856404;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.3s;
}

.safety-disclaimer a:hover {
    color: #533f03;
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */

@media (prefers-color-scheme: dark) {
    /* Main Sections */
    .homepage-intro,
    .why-notam-viewer,
    .what-are-notams,
    .how-to-use,
    .popular-countries,
    .recent-articles,
    .safety-disclaimer {
        background: #1e1e1e;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }

    /* Headings */
    .homepage-intro h2,
    .why-notam-viewer h2,
    .what-are-notams h2,
    .how-to-use h2,
    .popular-countries h2,
    .recent-articles h2,
    .safety-disclaimer h2 {
        color: #e0e0e0;
    }

    /* Text */
    .homepage-intro p,
    .what-are-notams p,
    .what-are-notams li,
    .how-to-use p,
    .how-to-use li,
    .popular-countries p,
    .recent-articles p {
        color: #b0b0b0;
    }

    /* Feature Grid */
    .feature {
        background: #2a2a2a;
        border-left-color: #5dade2;
    }

    .feature h3 {
        color: #e0e0e0;
    }

    .feature p {
        color: #a0a0a0;
    }

    /* Strong tags */
    .what-are-notams strong,
    .how-to-use strong {
        color: #e0e0e0;
    }

    /* Country Links */
    .country-links .region {
        background: #2a2a2a;
        border-top-color: #5dade2;
    }

    .country-links h3 {
        color: #e0e0e0;
        border-bottom-color: #3a3a3a;
    }

    .country-links a {
        background: #1e1e1e;
        border-color: #3a3a3a;
        color: #5dade2;
    }

    .country-links a:hover {
        background: #5dade2;
        color: #1e1e1e;
    }

    /* View All Button */
    .view-all-btn {
        background: #5dade2;
        color: #1e1e1e;
    }

    .view-all-btn:hover {
        background: #3498db;
    }

    /* Article Grid */
    .article-grid article {
        background: #2a2a2a;
        border-top-color: #5dade2;
    }

    .article-grid h3 a {
        color: #e0e0e0;
    }

    .article-grid h3 a:hover {
        color: #5dade2;
    }

    .article-grid p {
        color: #a0a0a0;
    }

    /* Safety Disclaimer - Dark Mode */
    .safety-disclaimer {
        background: #3a3000;
        border-left-color: #ffc107;
    }

    .safety-disclaimer p {
        color: #ffd54f;
    }

    .safety-disclaimer a {
        color: #ffd54f;
    }

    .safety-disclaimer a:hover {
        color: #ffecb3;
    }
}

/* Manual Dark Mode Toggle Support */
body.dark-mode .homepage-intro,
body.dark-mode .why-notam-viewer,
body.dark-mode .what-are-notams,
body.dark-mode .how-to-use,
body.dark-mode .popular-countries,
body.dark-mode .recent-articles,
body.dark-mode .safety-disclaimer {
    background: #1e1e1e;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

body.dark-mode .homepage-intro h2,
body.dark-mode .why-notam-viewer h2,
body.dark-mode .what-are-notams h2,
body.dark-mode .how-to-use h2,
body.dark-mode .popular-countries h2,
body.dark-mode .recent-articles h2,
body.dark-mode .safety-disclaimer h2 {
    color: #e0e0e0;
}

body.dark-mode .homepage-intro p,
body.dark-mode .what-are-notams p,
body.dark-mode .what-are-notams li,
body.dark-mode .how-to-use p,
body.dark-mode .how-to-use li,
body.dark-mode .popular-countries p,
body.dark-mode .recent-articles p {
    color: #b0b0b0;
}

body.dark-mode .feature {
    background: #2a2a2a;
    border-left-color: #5dade2;
}

body.dark-mode .feature h3 {
    color: #e0e0e0;
}

body.dark-mode .feature p {
    color: #a0a0a0;
}

body.dark-mode .what-are-notams strong,
body.dark-mode .how-to-use strong {
    color: #e0e0e0;
}

body.dark-mode .country-links .region {
    background: #2a2a2a;
    border-top-color: #5dade2;
}

body.dark-mode .country-links h3 {
    color: #e0e0e0;
    border-bottom-color: #3a3a3a;
}

body.dark-mode .country-links a {
    background: #1e1e1e;
    border-color: #3a3a3a;
    color: #5dade2;
}

body.dark-mode .country-links a:hover {
    background: #5dade2;
    color: #1e1e1e;
}

body.dark-mode .view-all-btn {
    background: #5dade2;
    color: #1e1e1e;
}

body.dark-mode .view-all-btn:hover {
    background: #3498db;
}

body.dark-mode .article-grid article {
    background: #2a2a2a;
    border-top-color: #5dade2;
}

body.dark-mode .article-grid h3 a {
    color: #e0e0e0;
}

body.dark-mode .article-grid h3 a:hover {
    color: #5dade2;
}

body.dark-mode .article-grid p {
    color: #a0a0a0;
}

body.dark-mode .safety-disclaimer {
    background: #3a3000;
    border-left-color: #ffc107;
}

body.dark-mode .safety-disclaimer p {
    color: #ffd54f;
}

body.dark-mode .safety-disclaimer a {
    color: #ffd54f;
}

body.dark-mode .safety-disclaimer a:hover {
    color: #ffecb3;
}

/* ============================================
   MOBILE RESPONSIVE (Tablets & Phones)
   ============================================ */

@media (max-width: 1024px) {
    .feature-grid,
    .country-links,
    .article-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    /* Single column layout on mobile */
    .feature-grid,
    .country-links,
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    /* Reduce padding on mobile */
    .homepage-intro,
    .why-notam-viewer,
    .what-are-notams,
    .how-to-use,
    .popular-countries,
    .recent-articles,
    .safety-disclaimer {
        padding: 20px;
        margin: 20px 10px;
    }
    
    /* Smaller headings on mobile */
    .homepage-intro h2,
    .why-notam-viewer h2,
    .what-are-notams h2,
    .how-to-use h2,
    .popular-countries h2,
    .recent-articles h2,
    .safety-disclaimer h2 {
        font-size: 24px;
    }
    
    /* Adjust font sizes */
    .homepage-intro p,
    .feature p,
    .what-are-notams p,
    .how-to-use p,
    .popular-countries p,
    .recent-articles p {
        font-size: 15px;
    }
    
    .feature h3 {
        font-size: 18px;
    }
    
    .country-links h3,
    .article-grid h3 {
        font-size: 17px;
    }
    
    /* Reduce numbered list spacing */
    .how-to-use li {
        padding-left: 45px;
    }
    
    .how-to-use li:before {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    /* Extra small phones */
    .homepage-intro,
    .why-notam-viewer,
    .what-are-notams,
    .how-to-use,
    .popular-countries,
    .recent-articles,
    .safety-disclaimer {
        padding: 15px;
        margin: 15px 5px;
    }
    
    .homepage-intro h2,
    .why-notam-viewer h2,
    .what-are-notams h2,
    .how-to-use h2,
    .popular-countries h2,
    .recent-articles h2,
    .safety-disclaimer h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .view-all-btn {
        display: block;
        text-align: center;
        width: 100%;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .homepage-intro,
    .why-notam-viewer,
    .what-are-notams,
    .how-to-use,
    .popular-countries,
    .recent-articles,
    .safety-disclaimer {
        background: white;
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    .country-links a,
    .article-grid h3 a,
    .view-all-btn {
        color: #000000;
        text-decoration: underline;
    }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */

/* Focus styles for keyboard navigation */
.country-links a:focus,
.article-grid h3 a:focus,
.view-all-btn:focus,
.safety-disclaimer a:focus {
    outline: 3px solid #3498db;
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .feature:hover,
    .country-links a:hover,
    .article-grid article:hover,
    .view-all-btn:hover {
        transform: none;
    }
}