/* =========================================
   CSS Variables & Theming
   ========================================= */
:root {
    --primary-color: #0A192F; /* Deep Navy Blue */
    --accent-color: #D4AF37;  /* Gold */
    --bg-white: #FFFFFF;
    --bg-light: #F8F9FA;      /* Light Slate/Gray */
    --text-dark: #333333;     /* Dark Charcoal */
    --text-light: #F8F9FA;
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    --transition-fast: 0.3s ease;
    --transition-slow: 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Offset for sticky header */
}

/* Bulletproof Scroll Anchor Offset */
#about, #philosophy, #services, #contact {
    scroll-margin-top: 100px;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.section-subtitle {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.highlight {
    color: var(--accent-color);
}

.text-center {
    text-align: center;
}

.section-padding {
    padding: 6rem 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--primary-color);
    border: 1px solid var(--accent-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--accent-color);
}

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

.btn-gold:hover {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

/* =========================================
   Navigation
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    background-color: transparent;
    transition: background-color var(--transition-fast), padding var(--transition-fast), box-shadow var(--transition-fast);
    z-index: 1000;
}

.navbar.scrolled {
    background-color: var(--primary-color);
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    line-height: 1.1;
}

.logo-text-wrapper {
    display: flex;
    flex-direction: column;
}

.nav-logo-img {
    height: 45px;
    width: auto;
    transition: height var(--transition-fast);
}

.navbar.scrolled .nav-logo-img {
    height: 38px;
}

.logo-subtitle {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-color);
}

.nav-menu ul {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-link {
    color: var(--text-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    transition: color var(--transition-fast);
}

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

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

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

.btn-contact {
    border: 1px solid var(--accent-color);
    padding: 0.5rem 1.25rem;
    border-radius: 2px;
}

.btn-contact::after {
    display: none;
}

.btn-contact:hover {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 2px;
    margin: 5px auto;
    background-color: var(--text-light);
    transition: all var(--transition-fast);
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('../assets/hero-bg.png') no-repeat center center/cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 25, 47, 0.7); /* Deep Navy tint */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--text-light);
    max-width: 800px;
}

.hero-headline {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.hero-subheadline {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-style: italic;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.hero-body {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    font-weight: 300;
}

/* =========================================
   About Us Section
   ========================================= */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
    color: #555;
}

.about-visual {
    position: relative;
    height: 100%;
    min-height: 400px;
}

.about-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 1;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.gold-accent-box {
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent-color);
    z-index: 0;
}

/* =========================================
   Philosophy & Services Section
   ========================================= */
.bg-light {
    background-color: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background-color: var(--bg-white);
    padding: 3rem 2rem;
    text-align: center;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    border-bottom: 3px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
    border-bottom-color: var(--accent-color);
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    background-color: rgba(10, 25, 47, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.service-card:hover .icon-wrapper {
    background-color: var(--primary-color);
    color: var(--accent-color);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.service-card p {
    color: #666;
    font-size: 0.95rem;
}

/* =========================================
   CTA & Footer Section
   ========================================= */
.cta-footer {
    background-color: var(--primary-color);
    color: var(--text-light);
    text-align: center;
}

.cta-container {
    padding: 6rem 0;
    max-width: 800px;
}

.cta-headline {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--bg-white);
}

.cta-body {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    font-weight: 300;
    opacity: 0.9;
}

/* Form Styles */
.contact-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
}

.form-errors {
    background-color: rgba(220, 53, 69, 0.2);
    border: 1px solid #dc3545;
    color: #ffb3b3;
    padding: 1rem;
    border-radius: 2px;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.form-errors p {
    margin-bottom: 0.5rem;
    margin-top: 0;
}
.form-errors p:last-child {
    margin-bottom: 0;
}

/* Ensure intl-tel-input takes full width */
.iti {
    width: 100%;
}
.iti__country-list {
    color: var(--text-dark); /* The dropdown list needs dark text since background is white */
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--bg-white);
    font-family: var(--font-body);
    font-size: 1rem;
    border-radius: 2px;
    transition: var(--transition-fast);
}

.contact-form textarea {
    resize: vertical;
    min-height: 100px;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.15);
}

.contact-form select {
    appearance: none;
    cursor: pointer;
}

.contact-form select option {
    background-color: var(--primary-color);
    color: var(--bg-white);
}

.btn-submit {
    margin-top: 0.5rem;
    width: 100%;
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 1.5rem 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

/* =========================================
   Animations
   ========================================= */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   Media Queries
   ========================================= */
@media (max-width: 992px) {
    .about-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-visual {
        min-height: 300px;
        order: -1; /* Image above text on mobile */
    }
}

@media (max-width: 768px) {
    .hero-headline {
        font-size: 2.5rem;
    }
    
    .hero-subheadline {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background-color: var(--primary-color);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: right var(--transition-slow);
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu ul {
        flex-direction: column;
        gap: 2rem;
    }
    
    .btn-contact {
        border: none;
        padding: 0;
    }
    
    .btn-contact::after {
        display: block;
    }
}

@media (max-width: 480px) {
    .hero-headline {
        font-size: 2rem;
    }
}

/* =========================================
   Daily Deal Analyzer Styles
   ========================================= */
.analyzer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.analyzer-inputs {
    background-color: var(--bg-white);
    padding: 2.5rem;
    border-radius: 4px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-row {
    display: flex;
    gap: 1.5rem;
}

.input-row .half {
    flex: 1;
}

.input-group label {
    display: flex;
    justify-content: space-between;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.val-display {
    color: var(--accent-color);
    font-weight: 700;
}

/* Range Sliders */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    margin-top: -8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: rgba(10, 25, 47, 0.2);
    border-radius: 2px;
}

input[type=range]:focus {
    outline: none;
}

/* Number Inputs */
.num-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(10, 25, 47, 0.2);
    border-radius: 2px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-dark);
}

.num-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.divider {
    border: 0;
    height: 1px;
    background: rgba(10, 25, 47, 0.1);
    margin: 2.5rem 0;
}

.divider-light {
    border: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 1.5rem 0;
}

/* Results Panel */
.sticky-panel {
    position: sticky;
    top: 120px;
}

.results-panel {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 2.5rem;
    border-radius: 4px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.panel-title {
    color: var(--accent-color);
    margin-bottom: 2rem;
    font-size: 1.8rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 1rem;
}

.result-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.result-row.highlight-row {
    font-size: 1.25rem;
    margin: 1.5rem 0;
    padding: 1rem 0;
    border-top: 1px dashed rgba(255,255,255,0.2);
    border-bottom: 1px dashed rgba(255,255,255,0.2);
}

.result-label {
    opacity: 0.9;
}

.result-value {
    font-weight: 600;
}

.result-value.bold {
    font-size: 1.5rem;
}

.positive-cashflow {
    color: #4ade80; /* Light Green */
}

.negative-cashflow {
    color: #f87171; /* Light Red */
}

@media (max-width: 992px) {
    .analyzer-grid {
        grid-template-columns: 1fr;
    }
    
    .sticky-panel {
        position: static;
        margin-top: 2rem;
    }
}

/* =========================================
   DIY Landlord Stress Test Quiz Styles
   ========================================= */
.quiz-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.quiz-container {
    background-color: var(--bg-white);
    padding: 3rem;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: relative;
    min-height: 450px;
}

/* Progress Bar */
.quiz-progress-wrapper {
    margin-bottom: 2.5rem;
}

.quiz-progress-text {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.quiz-progress-bar-bg {
    width: 100%;
    height: 6px;
    background-color: rgba(10, 25, 47, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.quiz-progress-bar-fill {
    height: 100%;
    background-color: var(--accent-color);
    transition: width 0.4s ease;
}

/* Step Container & Transitions */
.quiz-steps-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.quiz-step {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease;
}

.quiz-step.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    position: relative; /* Let active step dictate container height */
}

.quiz-step.next-step {
    transform: translateX(50px);
}

.quiz-step.prev-step {
    transform: translateX(-50px);
}

/* Question & Options */
.quiz-question {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    line-height: 1.3;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quiz-option {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1.5rem;
    background-color: var(--bg-light);
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    transition: var(--transition-fast);
}

.quiz-option:hover {
    background-color: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.quiz-option:hover .option-letter {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.option-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    background-color: rgba(10, 25, 47, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    font-weight: 700;
    font-family: var(--font-heading);
    margin-right: 1.5rem;
    font-size: 1.2rem;
    transition: var(--transition-fast);
}

.option-text {
    font-size: 1.1rem;
    line-height: 1.4;
}

/* Results Formatting */
.results-header {
    text-align: center;
    margin-bottom: 2rem;
}

.results-body {
    font-size: 1.2rem;
    line-height: 1.6;
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    border-radius: 4px;
}

.results-warning {
    background-color: rgba(220, 53, 69, 0.1);
    color: #b02a37;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.results-success {
    background-color: rgba(74, 222, 128, 0.1);
    color: #166534;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

@media (max-width: 768px) {
    .quiz-container {
        padding: 2rem 1.5rem;
    }
    
    .quiz-question {
        font-size: 1.5rem;
    }
    
    .quiz-option {
        padding: 1rem;
    }
    
    .option-letter {
        min-width: 35px;
        height: 35px;
        margin-right: 1rem;
        font-size: 1rem;
    }
    
    .option-text {
        font-size: 1rem;
    }
}
