/* 
 * Programmatic SEO Assignment Helpers Design System
 * Curated HSL Palettes, Glassmorphism, Premium Typography
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    /* Brand Color Scheme */
    --color-primary-h: 224;
    --color-primary-s: 46%;
    --color-primary-l: 20%;
    --primary: hsl(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l)); /* #1b2a4a */
    --primary-hover: hsl(var(--color-primary-h), var(--color-primary-s), calc(var(--color-primary-l) - 7%)); /* #121b30 */
    
    --color-secondary-h: 29;
    --color-secondary-s: 100%;
    --color-secondary-l: 50%;
    --secondary: hsl(var(--color-secondary-h), var(--color-secondary-s), var(--color-secondary-l)); /* #ff7a00 */
    --secondary-hover: hsl(var(--color-secondary-h), var(--color-secondary-s), calc(var(--color-secondary-l) - 6%)); /* #e06b00 */

    --whatsapp: #25d366;
    --whatsapp-hover: #128c7e;

    /* Neutrals */
    --text-dark: #2b354e;
    --text-muted: #64748b;
    --bg-light: #f8fafe;
    --bg-white: #ffffff;
    --border-light: rgba(226, 232, 240, 0.8);
    --border-glass: rgba(255, 255, 255, 0.2);

    /* UI Tokens */
    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --shadow-sm: 0 2px 4px rgba(27, 42, 74, 0.04);
    --shadow-md: 0 10px 20px rgba(27, 42, 74, 0.08);
    --shadow-lg: 0 20px 40px rgba(27, 42, 74, 0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary);
    line-height: 1.25;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary);
}

button, input, select, textarea {
    font-family: inherit;
}

/* Master Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Premium Header */
.site-header {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.site-logo {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-logo span {
    color: var(--secondary);
}

.nav-menu {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 15px;
    position: relative;
    padding: 8px 0;
}

.nav-link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--secondary);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--secondary);
}

.nav-link:hover:after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Premium Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 15px;
    gap: 8px;
}

.btn-primary {
    background-color: var(--secondary);
    color: var(--bg-white);
}

.btn-primary:hover {
    background-color: var(--secondary-hover);
    color: var(--bg-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 122, 0, 0.3);
}

.btn-secondary {
    background-color: var(--primary);
    color: var(--bg-white);
}

.btn-secondary:hover {
    background-color: var(--primary-hover);
    color: var(--bg-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(27, 42, 74, 0.3);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--bg-white);
}

.btn-whatsapp {
    background-color: var(--whatsapp);
    color: var(--bg-white);
}

.btn-whatsapp:hover {
    background-color: var(--whatsapp-hover);
    color: var(--bg-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1b2a4a 0%, #0d1627 100%);
    color: var(--bg-white);
    padding: 100px 0 140px;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: var(--bg-white);
    clip-path: polygon(0 100%, 100% 100%, 100% 0);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}

.hero-content h1 {
    font-size: 48px;
    line-height: 1.15;
    color: var(--bg-white);
    margin-bottom: 24px;
}

.hero-content h1 span {
    color: var(--secondary);
    background: linear-gradient(90deg, var(--secondary) 0%, #ffaa00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 36px;
    max-width: 580px;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    gap: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 32px;
}

.stat-item h3 {
    font-size: 32px;
    color: var(--secondary);
}

.stat-item p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0;
}

/* Glass Card Hero Mockup */
.hero-mockup {
    position: relative;
}

.glass-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-lg);
}

.glass-card h3 {
    color: var(--bg-white);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Standard Section Layout */
.section {
    padding: 100px 0;
}

.section-bg-light {
    background-color: var(--bg-light);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-header h2 {
    font-size: 36px;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 17px;
}

/* Feature Cards Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 40px 32px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
    transform: scaleX(1);
    background-color: var(--secondary);
}

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

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 15px;
}

/* Tab/Grid Catalog */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.catalog-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.catalog-card:hover {
    border-color: var(--secondary);
    transform: scale(1.03);
    box-shadow: var(--shadow-md);
}

.catalog-card h4 {
    font-size: 16px;
    margin-bottom: 8px;
}

.catalog-card .arrow {
    display: inline-block;
    margin-top: 12px;
    color: var(--secondary);
    font-weight: 600;
}

/* Dynamic Pricing Calculator Widget */
.calculator-widget {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 32px;
}

.calc-group {
    margin-bottom: 24px;
}

.calc-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-dark);
}

.calc-select, .calc-input {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-light);
    font-size: 15px;
    background-color: var(--bg-white);
    color: var(--text-dark);
    outline: none;
    transition: var(--transition);
}

.calc-select:focus, .calc-input:focus {
    border-color: var(--secondary);
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.calc-range {
    flex-grow: 1;
    height: 6px;
    background: var(--bg-light);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.calc-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--secondary);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(255, 122, 0, 0.4);
    transition: var(--transition);
}

.calc-range::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.calc-val {
    font-weight: 700;
    color: var(--primary);
    font-size: 16px;
    min-width: 70px;
    text-align: right;
}

.calc-summary {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    border: 1px solid var(--border-light);
}

.calc-price {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 12px;
}

/* Plagiarism Simulator Tool */
.plagiarism-checker {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-lg);
}

.text-area-wrapper {
    position: relative;
    margin-bottom: 24px;
}

.plag-textarea {
    width: 100%;
    height: 180px;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-light);
    resize: none;
    outline: none;
    font-size: 15px;
    transition: var(--transition);
}

.plag-textarea:focus {
    border-color: var(--secondary);
}

.word-count-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: var(--bg-light);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

.sim-results {
    display: none;
    margin-top: 24px;
    border-top: 1px dashed var(--border-light);
    padding-top: 24px;
}

.progress-bar-container {
    height: 12px;
    background: var(--bg-light);
    border-radius: 6px;
    overflow: hidden;
    margin: 16px 0;
}

.progress-fill {
    height: 100%;
    width: 0;
    border-radius: 6px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-fill.green { background: #22c55e; }
.progress-fill.red { background: #ef4444; }

.plag-percentage {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 800;
}

.plag-percentage.green { color: #22c55e; }
.plag-percentage.red { color: #ef4444; }

/* Citation Generator Tool */
.citation-tool {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-lg);
}

.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.cite-output-box {
    background: var(--bg-light);
    border: 1.5px dashed var(--primary);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-top: 24px;
    font-family: monospace;
    font-size: 14px;
    position: relative;
}

/* Floating WhatsApp Widget */
.whatsapp-floater {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--whatsapp);
    color: var(--bg-white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    z-index: 999;
    cursor: pointer;
    font-size: 30px;
    transition: var(--transition);
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-floater:hover {
    background-color: var(--whatsapp-hover);
    transform: scale(1.1) rotate(10deg);
}

@keyframes pulse-whatsapp {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Local Map Grid (Countries Index) */
.market-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.market-card {
    background: linear-gradient(to bottom right, var(--bg-white), var(--bg-light));
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition);
}

.market-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary);
}

.market-flag {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.market-card h3 {
    font-size: 20px;
    margin-bottom: 16px;
}

.market-meta {
    font-size: 14px;
    color: var(--text-muted);
    text-align: left;
    margin-bottom: 20px;
    border-top: 1px solid var(--border-light);
    padding-top: 16px;
}

.market-meta li {
    list-style: none;
    margin-bottom: 8px;
    display: flex;
    gap: 8px;
}

/* Accordion FAQs */
.accordion {
    max-width: 800px;
    margin: 0 auto;
}

.accordion-item {
    border-bottom: 1px solid var(--border-light);
    padding: 16px 0;
}

.accordion-header {
    width: 100%;
    background: transparent;
    border: none;
    text-align: left;
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.accordion-header::after {
    content: '+';
    font-size: 22px;
    color: var(--secondary);
    transition: var(--transition);
}

.accordion-header.active::after {
    content: '−';
    transform: rotate(180deg);
}

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

.accordion-body p {
    padding-top: 12px;
    color: var(--text-muted);
    font-size: 15px;
}

/* Footer Styles */
.site-footer {
    background-color: var(--primary);
    color: rgba(255, 255, 255, 0.7);
    padding: 80px 0 40px;
    border-top: 4px solid var(--secondary);
}

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

.footer-column h4 {
    color: var(--bg-white);
    font-size: 18px;
    margin-bottom: 24px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--secondary);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    color: var(--bg-white);
}

.footer-logo span {
    color: var(--secondary);
}

/* Review Stars styling */
.review-stars {
    color: #ffb800;
    font-size: 16px;
    display: inline-flex;
    gap: 2px;
}

/* Responsive styles */
@media (max-width: 991px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-ctas {
        justify-content: center;
    }
    .hero-stats {
        justify-content: center;
    }
    .nav-menu {
        display: none; /* In production, we'll build a mobile hamburger */
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 36px;
    }
    .section-header h2 {
        font-size: 28px;
    }
    .input-grid {
        grid-template-columns: 1fr;
    }
}

/* Top Utility Bar styling */
.top-bar {
    background-color: var(--primary);
    color: rgba(255, 255, 255, 0.85);
    font-size: 13.5px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.top-bar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.top-bar-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
}
.top-bar-link:hover {
    color: var(--secondary) !important;
}
