/* Global reset & base */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    min-height: 100%;
}

* {
    box-sizing: border-box;
}

/* HEADER & NAV */
.header {
    background: linear-gradient(135deg, #047857 0%, #0f766e 100%);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.site-logo {
    height: 40px;
    width: auto;
    border-radius: 6px;
}

.brand-link {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
}

.brand-link:hover {
    color: #e5e7eb;
}

/* Desktop nav */
.desktop-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: #ffffff;
    transition: all 0.25s ease;
    font-weight: 500;
    text-decoration: none;
    font-size: 0.98rem;
}

.nav-link:hover {
    color: #e5e7eb;
    transform: translateY(-1px);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    background: none;
    border: none;
    color: #ffffff;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.25s ease;
}

.dropdown-toggle:hover {
    color: #e5e7eb;
}

.dropdown-content {
    position: absolute;
    top: 110%;
    right: 0;
    background: #ffffff;
    min-width: 220px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    display: none;
    z-index: 1010;
}

.dropdown.open .dropdown-content {
    display: block;
}

.dropdown-content a {
    display: block;
    padding: 10px 18px;
    color: #4b5563;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.dropdown-content a:hover {
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    color: #ffffff;
}

/* Mobile menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 26px;
    cursor: pointer;
}

/* Slide-down green mobile menu */
.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #16a34a;
    padding: 8px 0;
    z-index: 1005;
    transform-origin: top;
}

.mobile-menu.open {
    display: block;
    animation: mobileMenuSlide 0.25s ease-out;
}

@keyframes mobileMenuSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu a {
    display: block;
    padding: 12px 24px;
    color: #ffffff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    font-weight: 500;
}

.mobile-menu a:last-child {
    border-bottom: none;
}

/* Dark overlay for mobile nav */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
    z-index: 1000;
}

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

/* PAGE HEADER (hero) */
.page-header {
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    color: #ffffff;
    padding: 80px 20px 110px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path d="M0,0 Q300,60 600,30 T1200,0 L1200,120 L0,120 Z" fill="rgba(255,255,255,0.12)"/></svg>')
        repeat-x bottom;
    background-size: 1200px 120px;
    opacity: 0.4;
}

.page-header h1 {
    font-size: 2.6rem;
    font-weight: 900;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.25);
    animation: slideInDown 0.6s ease;
}

.page-header p {
    font-size: 1.15rem;
    max-width: 760px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    animation: slideInUp 0.6s ease;
}

/* Animations */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(3deg);
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* MAIN CALCULATOR LAYOUT */
.calculator-container {
    max-width: 1400px;
    margin: -60px auto 60px;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.calculator-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.6s ease;
    margin-bottom: 24px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #047857;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Tabs */
.calc-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.calc-tab {
    padding: 10px 20px;
    background: #f0fdf4;
    border: 2px solid #e5e7eb;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    color: #374151;
    font-size: 0.95rem;
}

.calc-tab:hover {
    border-color: #10b981;
    transform: translateY(-1px);
}

.calc-tab.active {
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    color: #ffffff;
    border-color: #10b981;
}

/* Product cards */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.product-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    padding: 24px;
    border-radius: 16px;
    border: 2px solid #10b981;
    transition: all 0.25s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.22);
}

.product-card.best-value {
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    border-color: #059669;
    position: relative;
}

.product-card.best-value::before {
    content: '🏆 BEST VALUE';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #fbbf24;
    color: #78350f;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

.product-card.best-value .product-label,
.product-card.best-value .input-label {
    color: #ffffff;
}

.product-card.best-value .input-field {
    background: rgba(255, 255, 255, 0.96);
}

/* Inputs */
.product-label {
    font-weight: 700;
    color: #065f46;
    margin-bottom: 16px;
    font-size: 1.05rem;
    text-align: center;
}

.input-group {
    margin-bottom: 16px;
}

.input-label {
    font-weight: 600;
    color: #047857;
    margin-bottom: 6px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    display: block;
}

.input-field {
    width: 100%;
    padding: 12px;
    border: 2px solid #10b981;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.25s ease;
    color: #111827;
    background: #ffffff;
}

.input-field:focus {
    outline: none;
    border-color: #14b8a6;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18);
    transform: scale(1.01);
}

select.input-field {
    cursor: pointer;
}

/* Calculate button */
.calculate-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 40%, #15803d 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-top: 10px;
}

.calculate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(16, 185, 129, 0.5);
}

/* AdSense container */
.adsense-container {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border-radius: 16px;
    padding: 20px;
    margin: 24px 0;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #6ee7b7;
}

.adsense-placeholder {
    text-align: center;
    color: #065f46;
    font-size: 0.9rem;
}

/* Results area */
.result-display {
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    padding: 34px;
    border-radius: 20px;
    color: #ffffff;
    margin-bottom: 24px;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
    margin-top: 8px;
}

.result-card {
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    padding: 22px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.28);
    transition: all 0.25s ease;
}

.result-card:hover {
    background: rgba(255, 255, 255, 0.24);
    transform: translateY(-2px);
}

.result-card.best {
    background: rgba(251, 191, 36, 0.32);
    border: 2px solid #fbbf24;
    position: relative;
}

.result-card.best::before {
    content: '🏆';
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.8rem;
}

.result-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 10px;
    opacity: 0.96;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.result-value {
    font-size: 2.1rem;
    font-weight: 900;
    margin-bottom: 8px;
}

.result-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
}

.savings-info {
    font-size: 0.8rem;
    margin-top: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

.savings-info.best-badge {
    background: rgba(251, 191, 36, 0.3);
    border: 1px solid rgba(251, 191, 36, 0.8);
}

/* Info / helper boxes */
.info-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    padding: 18px 20px;
    border-radius: 12px;
    border-left: 4px solid #14b8a6;
    margin-top: 20px;
}

.info-title {
    font-weight: 700;
    color: #065f46;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.info-text {
    color: #047857;
    font-size: 0.9rem;
    line-height: 1.7;
}

/* Download buttons */
.download-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.download-btn {
    flex: 1 1 160px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.95rem;
}

.download-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(16, 185, 129, 0.4);
}

/* BLOG CONTENT */
.blog-section {
    max-width: 900px;
    margin: 60px auto;
    padding: 0 20px;
}

.blog-content {
    background: #ffffff;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    line-height: 1.8;
}

.blog-content h2 {
    font-size: 2.1rem;
    font-weight: 900;
    color: #111827;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.blog-content h3 {
    font-size: 1.45rem;
    font-weight: 700;
    color: #1f2937;
    margin-top: 26px;
    margin-bottom: 10px;
}

.blog-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #111827;
    margin-top: 18px;
    margin-bottom: 6px;
}

.blog-content p {
    color: #4b5563;
    font-size: 0.96rem;
    margin-bottom: 14px;
}

.blog-content ul,
.blog-content ol {
    color: #4b5563;
    margin-left: 22px;
    margin-bottom: 14px;
}

.blog-content li {
    margin-bottom: 6px;
}

.blog-content strong {
    color: #047857;
    font-weight: 700;
}

.blog-content a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.blog-content a:hover {
    text-decoration: underline;
}

/* FAQ */
.faq-item {
    margin-bottom: 18px;
}

/* FOOTER */
.footer {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: #ffffff;
    padding: 50px 0 20px;
    margin-top: 80px;
}

.footer-column h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: #e5e7eb;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

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

.footer-column ul li {
    margin-bottom: 8px;
}

.footer-column ul li a {
    color: #cbd5e0;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.footer-column ul li a:hover {
    color: #10b981;
    transform: translateX(3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin-top: 30px;
    padding-top: 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 0.85rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .desktop-nav {
        display: none !important;
    }

    .mobile-menu-btn {
        display: block;
    }

    .page-header {
        padding: 60px 16px 80px;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .page-header p {
        font-size: 0.95rem;
    }

    .calculator-card {
        padding: 24px;
    }

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

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

    .blog-content {
        padding: 26px 20px;
    }

    .blog-content h2 {
        font-size: 1.8rem;
    }

    .blog-content h3 {
        font-size: 1.3rem;
    }

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

    .calc-tabs {
        justify-content: center;
    }

    .calc-tab {
        font-size: 0.8rem;
        padding: 9px 14px;
    }
}
