/* Under The Cosh - Main Stylesheet */
/* Consolidated and cleaned up for mobile navigation fix */

/* ================================================
   RESET AND BASE STYLES
   ================================================ */

/* WordPress Theme Override for Calculator Pages */
body.page .wp-site-blocks,
body.page .wp-block-group {
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Force calculator container to full width */
.calculator-container,
.content-area {
    max-width: none !important;
    width: 100% !important;
    margin: 0 auto !important;
}

/* Override WordPress content width constraints */
.wp-block-post-content {
    max-width: none !important;
}

/* Ensure mobile responsiveness is maintained */
@media (max-width: 768px) {
    body.page .wp-site-blocks,
    .calculator-container {
        padding: 0 15px !important;
    }
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    line-height: 1.6;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    color: #2c3e50;
    background-color: #f8f9fa;
    line-height: 1.6;
}

/* ================================================
   LAYOUT CONTAINERS
   ================================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: start;
}

.content-area {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    overflow: hidden;
}

/* ================================================
   HEADER AND BRANDING
   ================================================ */

.header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #2c3e50 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.03)"/><circle cx="80" cy="80" r="1" fill="rgba(255,255,255,0.03)"/><circle cx="40" cy="60" r="1" fill="rgba(255,255,255,0.03)"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
}

.brand-section {
    position: relative;
    z-index: 1;
    padding: 30px 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.logo-icon {
    font-size: 3rem;
    margin-right: 20px;
    animation: pulse 2s infinite;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.brand-text {
    flex: 1;
}

.site-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #ecf0f1;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.tagline {
    font-size: 1.1rem;
    color: #bdc3c7;
    font-weight: 300;
    font-style: italic;
}

.site-description {
    max-width: 800px;
    font-size: 1.05rem;
    color: #ecf0f1;
    opacity: 0.9;
    line-height: 1.5;
    margin: 15px 0;
}

/* ================================================
   NAVIGATION SYSTEM - UNIFIED APPROACH
   ================================================ */

/* Main Navigation Container */
.main-nav {
    background: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.1);
    position: relative;
    z-index: 100;
    min-height: 60px;
}

.main-nav .container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    padding: 0 20px;
}

/* Desktop Navigation Menu */
.nav-menu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    list-style: none;
    padding: 15px 0;
    margin: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 25px;
    background: rgba(255,255,255,0.1);
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.nav-link.active {
    background: rgba(52, 152, 219, 0.8);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

/* Mobile Controls - Hidden by default */
.mobile-menu-toggle,
.mobile-menu-close {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
}

.mobile-menu-toggle {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    border-radius: 5px;
}

.mobile-menu-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.8);
    border-radius: 50%;
    z-index: 1003;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
}

.mobile-menu-close:hover {
    color: #3498db;
    transform: rotate(90deg);
}

/* Mobile Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

/* ================================================
   MOBILE NAVIGATION - SINGLE UNIFIED SECTION
   ================================================ */

/* Mobile Navigation */
@media screen and (max-width: 768px) {
    /* Show mobile controls */
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-nav.mobile-open .mobile-menu-close {
        display: block;
    }
    
    /* Transform navigation for mobile */
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: #2c3e50;
        flex-direction: column;
        padding: 80px 20px 20px;
        margin: 0;
        gap: 0;
        transition: left 0.3s ease;
        z-index: 1500;
        overflow-y: auto;
        box-shadow: 2px 0 15px rgba(0,0,0,0.3);
    }
    
    /* Show mobile menu when open */
    .main-nav.mobile-open .nav-menu {
        left: 0;
    }
    
    /* Mobile menu items */
    .nav-menu li {
        width: 100%;
        margin: 0;
    }
    
    /* Mobile navigation links */
    .nav-menu .nav-link {
        display: block;
        width: 100%;
        padding: 18px 20px;
        margin: 0;
        color: #ecf0f1;
        background: transparent;
        border: none;
        border-bottom: 1px solid #34495e;
        border-radius: 0;
        font-size: 16px;
        text-align: left;
        transition: all 0.3s ease;
    }
    
    .nav-menu .nav-link:hover,
    .nav-menu .nav-link.active {
        background: #3498db;
        color: white;
    }
    
    /* Adjust content grid for mobile */
    .content-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Small mobile adjustments */
@media screen and (max-width: 480px) {
    .nav-menu {
        width: 100%;
    }
}

/* Tablet navigation adjustments */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .nav-link {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

/* Large desktop navigation */
@media screen and (min-width: 1025px) {
    .nav-link {
        padding: 12px 24px;
    }
}

/* ================================================
   ADSENSE STYLES
   ================================================ */

.ad-leaderboard {
    text-align: center;
    margin: 25px auto;
    padding: 15px 0;
}

.ad-placeholder {
    background: linear-gradient(45deg, #ddd, #eee);
    border: 2px dashed #999;
    border-radius: 8px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 90px;
    width: 100%;
    max-width: 728px;
}

.ad-medium-rectangle,
.ad-half-page {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    justify-content: center;
    align-items: center;
}

.ad-medium-rectangle .ad-placeholder {
    width: 300px;
    height: 250px;
}

.ad-half-page .ad-placeholder {
    width: 300px;
    height: 600px;
}

/* ================================================
   MAIN CONTENT SECTIONS
   ================================================ */

.main-content {
    padding: 40px 0;
}

/* Hero Section */
.hero-section {
    padding: 40px 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid #e9ecef;
}

.hero-section h1,
.hero-section h2 {
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 700;
}

.hero-section > p,
.hero-description {
    font-size: 1.1rem;
    color: #5a6c7d;
    margin-bottom: 35px;
    line-height: 1.6;
}

.quick-calculators h3 {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 600;
}

/* ================================================
   CALCULATOR CARDS AND GRIDS
   ================================================ */

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

.calc-card {
    text-decoration: none;
    color: inherit;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 25px 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.calc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.1), transparent);
    transition: left 0.5s;
}

.calc-card:hover::before {
    left: 100%;
}

.calc-card:hover {
    border-color: #3498db;
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(52, 152, 219, 0.15);
}

.calc-card.featured {
    border-color: #3498db;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.calc-card.featured:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(52, 152, 219, 0.3);
}

.calc-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 15px;
}

.calc-card h3,
.calc-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.calc-card h3 a,
.calc-card h4 a {
    color: inherit;
    text-decoration: none;
}

.calc-card.featured h3 a,
.calc-card.featured h4 a {
    color: white;
}

.calc-card p {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.4;
}

/* Calculator Categories */
.calculator-categories,
.calculators-section {
    padding: 40px 30px;
}

.calculator-categories > h2,
.calculators-section > h2 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 35px;
    font-weight: 700;
    text-align: center;
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.calculator-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.calculator-card:hover {
    border-color: #3498db;
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(52, 152, 219, 0.15);
}

.calculator-card.featured {
    border-color: #3498db;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.calculator-card.uk-specific {
    border-left: 5px solid #27ae60;
}

.category-section {
    margin-bottom: 35px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 5px solid #3498db;
}

.category-section h3 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.category-icon {
    font-size: 1.5rem;
}

.calc-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.calc-links a {
    color: #3498db;
    text-decoration: none;
    padding: 12px 16px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    font-weight: 500;
}

.calc-links a:hover {
    background: #3498db;
    color: white;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

/* ================================================
   FEATURES AND INFO SECTIONS
   ================================================ */

.features-section,
.info-section {
    padding: 40px 30px;
    background: #f8f9fa;
}

.features-section h2,
.info-section h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
}

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

.feature-card,
.tip-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.feature-card:hover,
.tip-card:hover {
    transform: translateY(-5px);
}

.feature-card h4,
.tip-card h4 {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 12px;
    font-weight: 600;
}

.feature-card p,
.tip-card p {
    color: #5a6c7d;
    line-height: 1.5;
}

.tip-card ul {
    color: #5a6c7d;
    line-height: 1.5;
    margin-left: 20px;
}

.tip-card ul li {
    margin-bottom: 8px;
}

/* ================================================
   SIDEBAR
   ================================================ */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.sidebar-section h3 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 18px;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.popular-links,
.related-links {
    list-style: none;
}

.popular-links li,
.related-links li {
    margin-bottom: 12px;
}

.popular-links a,
.related-links a {
    color: #3498db;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 500;
}

.popular-links a:hover,
.related-links a:hover {
    background: #3498db;
    color: white;
    transform: translateX(5px);
}

/* Market Info */
.market-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.market-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.market-item:last-child {
    border-bottom: none;
}

.market-label {
    font-size: 0.9rem;
    color: #5a6c7d;
    font-weight: 500;
}

.market-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
}

.market-disclaimer {
    text-align: center;
    color: #666;
    font-size: 0.8rem;
    margin-top: 15px;
}

/* ================================================
   FOOTER
   ================================================ */

.footer {
    background: #2c3e50;
    color: #ecf0f1;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    padding: 40px 0;
}

.footer-section h4 {
    color: #3498db;
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 600;
}

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

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

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #3498db;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding: 20px 0;
    text-align: center;
    color: #95a5a6;
    font-size: 0.9rem;
}

/* ================================================
   FORM AND CALCULATOR STYLES
   ================================================ */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.btn,
.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 14px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

.btn:hover,
.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.result {
    margin-top: 25px;
    padding: 25px;
    background: linear-gradient(135deg, #e8f6f3 0%, #d5f3e6 100%);
    border-radius: 12px;
    border-left: 5px solid #27ae60;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.1);
}

.result h3 {
    color: #27ae60;
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 600;
}

/* Calculator Container */
.calculator-container {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.calculator-container h2 {
    font-size: 1.6rem;
    color: #2c3e50;
    margin-bottom: 25px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Calculator Tabs */
.calculator-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 25px;
    background: #f8f9fa;
    padding: 5px;
    border-radius: 10px;
}

.calculator-tab {
    padding: 12px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    flex: 1;
    text-align: center;
}

.calculator-tab.active {
    background: #3498db;
    color: white;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.calculator-tab:hover:not(.active) {
    background: rgba(52, 152, 219, 0.1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

/* Region Selector */
.region-selector {
    display: flex;
    gap: 25px;
    align-items: center;
    flex-wrap: wrap;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
}

.region-selector > div {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.region-selector label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.region-selector select {
    padding: 10px 14px;
    border-radius: 6px;
    border: 2px solid #ddd;
    background: white;
    font-size: 0.9rem;
    min-width: 160px;
}

/* Current Rates Banner */
.current-rates-banner {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-top: 30px;
    border: 1px solid #e9ecef;
}

.current-rates-banner h3 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
}

.rates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.rate-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e9ecef;
}

.rate-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.rate-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
}

.rates-disclaimer {
    text-align: center;
    color: #666;
    font-size: 0.85rem;
    margin: 0;
}

/* ================================================
   MOBILE RESPONSIVE ADJUSTMENTS
   ================================================ */

@media screen and (max-width: 768px) {
    /* Typography adjustments */
    .hero-section h1,
    .hero-section h2 {
        font-size: 1.8rem;
    }
    
    /* Grid adjustments */
    .calc-grid,
    .calculator-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .calc-links {
        grid-template-columns: 1fr;
    }
    
    .features-grid,
    .tips-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .rates-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Region selector mobile */
    .region-selector {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
    
    .region-selector > div {
        flex-direction: row;
        align-items: center;
        gap: 15px;
    }
    
    .region-selector label {
        min-width: 80px;
    }

    /* Section padding adjustments */
    .hero-section,
    .calculator-categories,
    .calculators-section,
    .features-section,
    .info-section {
        padding: 25px 20px;
    }
    
    .calculator-container {
        padding: 20px;
    }
}

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

@media print {
    .header,
    .footer,
    .sidebar,
    .ad-leaderboard,
    .ad-medium-rectangle,
    .ad-half-page,
    .mobile-menu-toggle,
    .mobile-menu-close,
    .mobile-overlay {
        display: none;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        padding: 20px 0;
    }
}

/* ACCORDION SYSTEM - Component Architecture */
.calculator-accordion {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 25px;
    overflow: hidden;
}

.accordion-category {
    border-bottom: 1px solid #e9ecef;
}

.accordion-category:last-child {
    border-bottom: none;
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    width: 100%;
    text-align: left;
}

.accordion-header:hover {
    background: #e9ecef;
}

.accordion-header.active {
    background: #e8f6f3;
    border-left: 5px solid #27ae60;
}

.accordion-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.accordion-icon {
    font-size: 1.3rem;
}

.accordion-chevron {
    font-size: 1.2rem;
    color: #666;
    transition: transform 0.3s ease;
}

.accordion-header.active .accordion-chevron {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content.active {
    max-height: 500px;
}

.accordion-body {
    padding: 20px;
    background: white;
}

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

.calculator-card {
    display: block;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.calculator-card:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-decoration: none;
    color: #2c3e50;
}

.calculator-card.unavailable {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f1f2f6;
}

.calculator-card.unavailable:hover {
    transform: none;
    box-shadow: none;
}

.calculator-name {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1rem;
}

.calculator-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

/* Mobile Optimization */
@media screen and (max-width: 768px) {
    .calculator-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .accordion-header {
        padding: 15px;
    }
    
    .accordion-title {
        font-size: 1rem;
    }
    
    .calculator-card {
        padding: 15px;
    }
}

/* QUICK CALCULATOR PANEL */
.quick-calculators {
    background: linear-gradient(135deg, #e8f6f3 0%, #d5f3e6 100%);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    border-left: 5px solid #27ae60;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.quick-calculators h3 {
    color: #27ae60;
    margin-bottom: 15px;
    font-size: 1.2rem;
    text-align: center;
    font-weight: 700;
}

.quick-calc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 15px;
}

.quick-calc-card {
    background: white;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    text-decoration: none;
    color: #2c3e50;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    min-height: 85px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.quick-calc-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.2);
    text-decoration: none;
    color: #2c3e50;
}

.quick-calc-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
    display: block;
}

.quick-calc-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
}

.view-all-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.view-all-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

/* Mobile responsive adjustments */
@media screen and (max-width: 480px) {
    .quick-calc-grid {
        gap: 10px;
    }
    
    .quick-calc-card {
        min-height: 75px;
        padding: 12px;
    }
    
    .quick-calc-icon {
        font-size: 1.5rem;
        margin-bottom: 6px;
    }
    
    .quick-calc-title {
        font-size: 0.8rem;
    }
}

/* US Tax Calculator Specific Styles - Add to end of styles.css */

/* Tax Brackets Table */
.tax-brackets-table {
    margin: 20px 0;
    overflow-x: auto;
}

.tax-brackets-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tax-brackets-table th,
.tax-brackets-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.tax-brackets-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.tax-brackets-table tr:nth-child(even) {
    background: #f8f9fa;
}

.tax-brackets-table tr:hover {
    background: #e8f4f8;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.result-item:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.1);
}

.result-item.highlight {
    background: linear-gradient(135deg, #e8f6f3 0%, #d5f3e6 100%);
    border-color: #27ae60;
    font-weight: 600;
}

.result-item strong {
    color: #2c3e50;
    font-size: 0.9rem;
}

.result-item span {
    font-size: 1rem;
    font-weight: 600;
    color: #27ae60;
}

.result-item.highlight span {
    color: #27ae60;
    font-size: 1.1rem;
}

/* Tax Breakdown */
.tax-breakdown {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.tax-breakdown h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.tax-breakdown table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 6px;
    overflow: hidden;
}

.tax-breakdown th,
.tax-breakdown td {
    padding: 10px 12px;
    text-align: right;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.9rem;
}

.tax-breakdown th {
    background: #2c3e50;
    color: white;
    font-weight: 600;
}

.tax-breakdown th:first-child,
.tax-breakdown td:first-child {
    text-align: left;
}

/* Info Section Styling */
.info-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.info-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

.info-section ul {
    margin-left: 20px;
    color: #5a6c7d;
}

.info-section ul li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.info-section ul li strong {
    color: #2c3e50;
}

/* Mobile Responsive Adjustments */
@media screen and (max-width: 768px) {
    .results-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .tax-brackets-table {
        font-size: 0.8rem;
    }
    
    .tax-brackets-table th,
    .tax-brackets-table td {
        padding: 8px 10px;
    }
    
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .result-item span {
        font-size: 1.1rem;
    }
}

@media screen and (max-width: 480px) {
    .tax-brackets-table table {
        font-size: 0.75rem;
    }
    
    .tax-brackets-table th,
    .tax-brackets-table td {
        padding: 6px 8px;
    }
}

/* ================================================
   REGION SWITCHER - MINIMAL ADDITIONS ONLY
   ================================================ */

/* Current region display styling */
.current-region {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    padding: 8px 12px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

/* Region select dropdown enhancement */
#region-select {
    min-width: 250px;
}

/* Limit region switcher container width */
.calculator-container:has(.current-region) {
    max-width: 500px;
}

/* Optional: Region suggestion banner */
.region-suggestion {
    background: #e3f2fd;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #2196F3;
}

.region-suggestion a {
    color: #1976d2;
    font-weight: 500;
    text-decoration: none;
}

.region-suggestion button {
    float: right;
    background: none;
    border: none;
    font-size: 18px;
    color: #666;
    cursor: pointer;
}

/* Header Integration Styles */
.main-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Changed from center */
    gap: 20px;
}

.nav-menu {
    flex: 1; /* Take available space */
    justify-content: center; /* Keep navigation centered */
}

.global-region-selector {
    flex-shrink: 0; /* Don't shrink */
    margin-left: auto; /* Push to right */
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .main-nav .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .global-region-selector {
        margin-left: 0;
        order: -1; /* Show above navigation on mobile */
    }
}

/* ADD THESE MISSING STYLES */
.region-flag {
    font-size: 18px;
    line-height: 1;
}

.region-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.region-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
}

.region-currency {
    font-size: 11px;
    opacity: 0.8;
    line-height: 1.2;
}

.dropdown-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
    opacity: 0.7;
}

.region-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    color: #333;
}

.region-options {
    max-height: 300px;
    overflow-y: auto;
}

.region-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    transition: background-color 0.2s ease;
}

.region-option:hover {
    background-color: #f8f9fa;
}
/* Region Selector Block Styles */
.fincalc-region-selector.alignleft {
    text-align: left;
}

.fincalc-region-selector.aligncenter {
    text-align: center;
}

.fincalc-region-selector.alignright {
    text-align: right;
}

.fincalc-region-selector.compact-mode .current-region-display {
    padding: 6px 12px;
    min-width: 120px;
}

.fincalc-region-selector.compact-mode .region-name {
    font-size: 12px;
}

.fincalc-region-selector.compact-mode .region-currency {
    font-size: 10px;
}

.fincalc-region-selector.no-arrow .dropdown-arrow {
    display: none;
}

/* Region Selector Dropdown Styling */
.region-dropdown {
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    max-width: 200px !important;
}

.region-dropdown-header {
    font-size: 14px !important;
    padding: 10px 16px !important;
}

.region-option {
    font-size: 14px !important;
    padding: 8px 16px !important;
}

.region-option:hover {
    background-color: #f5f5f5 !important;
}

/* Fix region selector layout issues */
.current-region-display {
    min-width: 100px !important;
    max-width: 120px !important;
    white-space: nowrap !important;
}

.region-dropdown {
    min-width: 140px !important;
    max-width: 160px !important;
}

.region-name {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.region-currency {
    white-space: nowrap !important;
}

.region-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    min-width: 220px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 1001;
    margin-top: 4px;
}

.region-dropdown.active {
    display: block;
}
