/* CSS VARIABLES */
:root {
    --santa-red: #D42426;
    --santa-green: #165B33;
    --snow-white: #F8F9FA;
    --parchment: #FDFBF7;
    --text-dark: #333;
    --nav-bg: #fff;
    --footer-bg: #222;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--snow-white);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* --- NAVIGATION --- */
.navbar {
    background: var(--nav-bg);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.nav-logo {
    font-family: 'Mountains of Christmas', cursive;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--santa-red);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: var(--santa-red);
}

.menu-toggle {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-dark);
    transition: all 0.3s ease-in-out;
}

/* --- HERO SECTION --- */
.hero {
    background: var(--santa-red);
    color: white;
    padding: 3rem 1rem;
    text-align: center;
    border-bottom: 5px solid var(--santa-green);
    background-image: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,0.1) 10px, rgba(255,255,255,0.1) 20px);
}

.hero h1 {
    font-family: 'Mountains of Christmas', cursive;
    font-size: 2.5rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-top: 10px;
}

/* --- LAYOUT & ADS --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.ad-zone {
    width: 100%;
    min-height: 100px;
    background: #f0f0f0;
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #999;
    font-size: 0.8rem;
    border: 1px dashed #ccc;
}

.main-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* --- EDITOR PANEL --- */
.editor-panel {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    height: fit-content;
}

.section-title {
    color: var(--santa-green);
    margin-top: 0;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    font-family: 'Mountains of Christmas', cursive;
    font-size: 1.8rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--santa-green);
    font-size: 0.9rem;
}

select, input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: 'Open Sans', sans-serif;
    box-sizing: border-box;
}

select:focus, input:focus {
    outline: none;
    border-color: var(--santa-red);
    box-shadow: 0 0 0 3px rgba(212, 36, 38, 0.1);
}

/* --- BUTTONS --- */
.btn-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-word {
    background-color: #2b5797;
    color: white;
}

.btn-pdf {
    background-color: var(--santa-red);
    color: white;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* --- PREVIEW PANEL --- */
.preview-panel {
    background: #e9ecef;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: center;
}

.letter-paper {
    background: var(--parchment);
    width: 100%;
    max-width: 600px;
    min-height: 700px;
    padding: 3rem;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    box-sizing: border-box;
    position: relative;
}

/* Add old paper texture effect via pseudo-element */
.letter-paper:before {
    content: "";
    position: absolute;
    top:0; left:0; right:0; bottom:0;
    border: 1px solid #d4af37;
    margin: 10px;
    pointer-events: none;
}

.letter-header {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--santa-red);
    padding-bottom: 1rem;
}

.letter-title {
    font-family: 'Mountains of Christmas', cursive;
    font-weight: bold;
    font-size: 1.8rem;
    color: var(--santa-red);
    text-transform: uppercase;
}

.letter-sub {
    font-size: 0.8rem;
    color: #666;
    letter-spacing: 2px;
    margin-top: 5px;
}

.letter-body {
    font-family: 'Georgia', serif; /* Classic serif for body */
    font-size: 1.15rem;
    line-height: 1.8;
    white-space: pre-wrap;
    text-align: left;
    color: #222;
}

.letter-signature {
    margin-top: 3rem;
    text-align: right;
    font-family: 'Great Vibes', cursive; /* Handwriting font */
    font-size: 2.5rem;
    color: var(--santa-green);
    transform: rotate(-5deg);
}

/* --- FOOTER --- */
.site-footer {
    background: var(--footer-bg);
    color: #fff;
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-col h3 {
    color: var(--santa-red);
    margin-top: 0;
    font-family: 'Mountains of Christmas', cursive;
    font-size: 1.4rem;
    letter-spacing: 1px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: white;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid #333;
    color: #666;
    font-size: 0.85rem;
}

.seo-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    /* Mobile Nav */
    .menu-toggle {
        display: block;
    }
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        gap: 0;
        flex-direction: column;
        background-color: var(--nav-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 5px 5px rgba(0,0,0,0.1);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 16px 0;
    }

    /* Layout */
    .main-layout {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }

    .letter-paper {
        padding: 1.5rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
}

/* --- PRINT STYLES --- */
@media print {
    .navbar, .hero, .editor-panel, .btn-group, .seo-content, .ad-zone, .site-footer {
        display: none !important;
    }
    body {
        background: white;
    }
    .container, .main-layout {
        display: block;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    .preview-panel {
        background: white;
        box-shadow: none;
        border: none;
        padding: 0;
        margin: 0;
        display: block;
    }
    .letter-paper {
        box-shadow: none;
        border: none;
        max-width: 100%;
        padding: 0;
    }
    .letter-paper:before {
        display: none; /* Remove gold border for print */
    }
}
