/* Shared styles for content pages */

/* Prevent horizontal overflow on mobile */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Navigation */
.main-nav {
    background: var(--card-bg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    margin: -20px -20px 30px -20px;
    padding: 0 20px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    gap: 20px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 20px;
}

.logo-icon {
    font-size: 28px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--accent-color);
}

.nav-links a.active {
    background: var(--accent-color);
    color: white;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: var(--transition);
}

/* Nav Actions (theme toggle + hamburger) */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle-btn {
    background: rgba(102, 126, 234, 0.1);
    border: none;
    border-radius: 12px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 20px;
}

.theme-toggle-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: scale(1.05);
}

/* Unit Toggle Button */
.unit-toggle-btn {
    font-weight: 600;
    font-size: 16px;
    min-width: 44px;
}

.unit-toggle-btn span {
    font-weight: 600;
}

/* Favorites Bar */
.favorites-bar {
    margin-bottom: 20px;
}

/* Page Content Layout */
.page-content {
    padding: 0 20px 40px;
}

.page-content .container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    align-items: start;
}

/* Content Card */
.content-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow);
}

.page-header {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.page-header.centered {
    text-align: center;
}

.page-header h1 {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.page-header .subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
}

.page-header.centered .subtitle {
    margin: 0 auto;
}

/* Content Sections */
.content-section {
    margin-bottom: 40px;
}

.content-section h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.content-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 25px 0 15px;
}

.content-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 15px;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.feature-card {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 16px;
    padding: 25px;
    transition: var(--transition);
}

.feature-card:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-3px);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* Styled List */
.styled-list {
    list-style: none;
    padding: 0;
}

.styled-list li {
    padding: 12px 0 12px 30px;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.6;
    border-bottom: 1px solid rgba(102, 126, 234, 0.05);
}

.styled-list li:last-child {
    border-bottom: none;
}

.styled-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: 600;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    margin-top: 40px;
}

.cta-section h2 {
    margin-bottom: 15px;
}

.cta-section p {
    max-width: 500px;
    margin: 0 auto 25px;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 14px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.cta-button.large {
    padding: 18px 40px;
    font-size: 18px;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
}

.sidebar-card.sticky {
    position: sticky;
    top: 100px;
}

.sidebar-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.city-links,
.quick-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.city-links li,
.quick-links li {
    margin-bottom: 10px;
}

.city-links a,
.quick-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    transition: var(--transition);
}

.city-links a:hover,
.quick-links a:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--accent-color);
}

.see-all-link {
    display: block;
    text-align: center;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    padding-top: 15px;
    margin-top: 10px;
    border-top: 1px solid rgba(102, 126, 234, 0.1);
}

.see-all-link:hover {
    text-decoration: underline;
}

/* Footer */
.main-footer {
    background: var(--card-bg);
    margin: 40px -20px -20px -20px;
    padding: 50px 20px 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.footer-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-light);
    font-size: 13px;
}

/* FAQ Styles */
.faq-section {
    margin-bottom: 40px;
}

.faq-section h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
}

.faq-item {
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    gap: 15px;
}

.faq-question span {
    font-size: 17px;
    font-weight: 500;
    color: var(--text-primary);
}

.faq-icon {
    width: 24px;
    height: 24px;
    color: var(--accent-color);
    flex-shrink: 0;
    transition: var(--transition);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding-bottom: 20px;
}

.faq-answer p,
.faq-answer ul {
    color: var(--text-secondary);
    line-height: 1.7;
}

.faq-answer ul {
    padding-left: 20px;
    margin: 15px 0;
}

.faq-answer li {
    margin-bottom: 8px;
}

/* Table of Contents */
.table-of-contents {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 40px;
}

.table-of-contents h2 {
    font-size: 18px;
    margin-bottom: 15px;
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
}

.table-of-contents a {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 14px;
    padding: 6px 0;
    display: block;
}

.table-of-contents a:hover {
    text-decoration: underline;
}

/* Guide Section */
.guide-section {
    margin-bottom: 50px;
    padding-bottom: 50px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.guide-section:last-of-type {
    border-bottom: none;
}

.guide-section h2 {
    font-size: 26px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.guide-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 30px 0 15px;
}

/* Info Tables */
.info-table {
    overflow-x: auto;
    margin: 20px 0;
}

.info-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.info-table th,
.info-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.info-table th {
    background: rgba(102, 126, 234, 0.1);
    color: var(--text-primary);
    font-weight: 600;
}

.info-table td {
    color: var(--text-secondary);
}

.info-table tr:hover td {
    background: rgba(102, 126, 234, 0.03);
}

/* UV Scale */
.uv-scale,
.aqi-scale {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 25px 0;
}

.uv-level,
.aqi-level {
    display: grid;
    grid-template-columns: 80px 120px 1fr;
    align-items: center;
    padding: 15px 20px;
    border-radius: 12px;
    gap: 15px;
}

.uv-number,
.aqi-number {
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.uv-label,
.aqi-label {
    font-weight: 600;
    color: white;
}

.uv-level p,
.aqi-level p {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

/* UV Colors */
.uv-low { background: linear-gradient(135deg, #4CAF50, #45a049); }
.uv-moderate { background: linear-gradient(135deg, #FFC107, #e6ac00); }
.uv-high { background: linear-gradient(135deg, #FF9800, #e68900); }
.uv-very-high { background: linear-gradient(135deg, #f44336, #da3c30); }
.uv-extreme { background: linear-gradient(135deg, #9C27B0, #7B1FA2); }

/* AQI Colors */
.aqi-good { background: linear-gradient(135deg, #4CAF50, #45a049); }
.aqi-moderate { background: linear-gradient(135deg, #FFEB3B, #e6d535); color: #333; }
.aqi-moderate .aqi-number,
.aqi-moderate .aqi-label,
.aqi-moderate p { color: #333; }
.aqi-sensitive { background: linear-gradient(135deg, #FF9800, #e68900); }
.aqi-unhealthy { background: linear-gradient(135deg, #f44336, #da3c30); }
.aqi-very-unhealthy { background: linear-gradient(135deg, #9C27B0, #7B1FA2); }
.aqi-hazardous { background: linear-gradient(135deg, #800000, #660000); }

/* Tip Box */
.tip-box {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-left: 4px solid var(--accent-color);
    border-radius: 0 12px 12px 0;
    padding: 20px 25px;
    margin: 25px 0;
}

.tip-box h4 {
    color: var(--text-primary);
    font-size: 16px;
    margin-bottom: 10px;
}

.tip-box p {
    margin: 0;
    font-size: 14px;
}

/* Symbols Grid */
.symbols-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 25px 0;
}

.symbol-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 12px;
}

.symbol {
    font-size: 32px;
}

.symbol-name {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Glossary */
.glossary-list {
    margin: 0;
}

.glossary-list dt {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 16px;
    margin-top: 20px;
}

.glossary-list dd {
    margin: 10px 0 0 0;
    color: var(--text-secondary);
    line-height: 1.6;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

/* Cities Page */
.cities-page {
    display: block !important;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow);
}

.cities-page .page-header {
    text-align: center;
}

.search-cta {
    margin-top: 20px;
}

.search-cta a {
    color: var(--accent-color);
    font-weight: 500;
}

.continent-section {
    margin-bottom: 50px;
}

.continent-section h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
}

.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.city-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 25px 20px;
    background: var(--card-bg);
    border-radius: 16px;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.city-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.city-flag {
    font-size: 32px;
}

.city-card .city-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.city-card .city-country {
    font-size: 13px;
    color: var(--text-secondary);
}

.search-section-bottom {
    text-align: center;
    padding: 50px 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: var(--border-radius);
    margin-top: 30px;
}

.search-section-bottom h2 {
    font-size: 28px;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.search-section-bottom p {
    color: var(--text-secondary);
    margin-bottom: 25px;
}

/* City Weather Page */
.city-weather-page {
    max-width: 100%;
}

.breadcrumb {
    margin-bottom: 25px;
}

.breadcrumb ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.breadcrumb li:not(:last-child)::after {
    content: "›";
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--accent-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.city-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.city-title {
    display: flex;
    align-items: center;
    gap: 20px;
}

.city-flag-large {
    font-size: 50px;
}

.city-title h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.city-location {
    font-size: 16px;
    color: var(--text-secondary);
    margin-top: 5px;
}

.city-overview {
    margin-bottom: 40px;
}

.city-overview h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.city-overview p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 25px;
}

.weather-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 25px 15px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 16px;
    text-align: center;
}

.stat-icon {
    font-size: 32px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Seasonal Weather */
.seasonal-weather {
    margin-bottom: 40px;
}

.seasonal-weather h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 25px;
}

.season-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.season-card {
    padding: 25px;
    border-radius: 16px;
    border-left: 4px solid;
}

.season-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 15px 0;
}

.season-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 10px 0;
}

.season-card p:last-child {
    margin-bottom: 0;
}

.season-card.spring {
    background: rgba(255, 182, 193, 0.1);
    border-color: #FF69B4;
}

.season-card.summer {
    background: rgba(255, 193, 7, 0.1);
    border-color: #FFC107;
}

.season-card.autumn {
    background: rgba(255, 152, 0, 0.1);
    border-color: #FF9800;
}

.season-card.winter {
    background: rgba(33, 150, 243, 0.1);
    border-color: #2196F3;
}

/* Best Time Section */
.best-time {
    margin-bottom: 40px;
}

.best-time h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.best-time h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 25px 0 15px;
}

.best-time p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Responsive Design */
@media (max-width: 992px) {
    .page-content .container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }

    .sidebar-card.sticky {
        position: static;
    }
}

@media (max-width: 768px) {
    .main-nav {
        margin: -15px -15px 20px -15px;
        padding: 0 15px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--card-bg);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-actions .nav-toggle {
        display: flex;
    }

    /* Weather Guides tablet fixes */
    .table-of-contents ul {
        grid-template-columns: 1fr 1fr;
    }

    .guide-section h2 {
        font-size: 24px;
    }

    .info-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .content-card {
        overflow-x: hidden;
    }

    .theme-toggle-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .page-content {
        padding: 0 15px 30px;
    }

    .content-card,
    .cities-page {
        padding: 25px;
    }

    .page-header h1 {
        font-size: 28px;
    }

    .city-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .city-title {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .city-title h1 {
        font-size: 26px;
    }

    .uv-level,
    .aqi-level {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .content-card,
    .cities-page {
        padding: 20px;
    }

    .page-header h1 {
        font-size: 24px;
    }

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

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

    .season-cards {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }

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

    /* Weather Guides mobile fixes */
    .table-of-contents ul {
        grid-template-columns: 1fr;
    }

    .guide-section h2 {
        font-size: 22px;
    }

    .info-table {
        margin-left: -20px;
        margin-right: -20px;
        padding: 0 20px;
    }

    .info-table table {
        font-size: 13px;
        min-width: 100%;
    }

    .info-table th,
    .info-table td {
        padding: 10px 8px;
    }
}
