
/* ============================================
   BEAUTIFUL STORY WORLD - Main Stylesheet
   Domain: beautifulstoryworld
   Theme: Elegant Memories & Stories
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;800&family=Lora:ital,wght@0,400;0,500;0,600;1,400&family=Poppins:wght@300;400;500;600&display=swap');

:root {
    --primary: #8B4513;
    --primary-light: #A0522D;
    --secondary: #D2691E;
    --accent: #CD853F;
    --gold: #DAA520;
    --cream: #FFF8DC;
    --ivory: #FFFFF0;
    --warm-white: #FFFAF0;
    --dark-brown: #3E2723;
    --text-dark: #2C1810;
    --text-light: #6B4423;
    --shadow: rgba(139, 69, 19, 0.15);
    --gradient-gold: linear-gradient(135deg, #DAA520 0%, #B8860B 50%, #DAA520 100%);
    --gradient-warm: linear-gradient(135deg, #FFF8DC 0%, #FFEFD5 50%, #FFF8DC 100%);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lora', serif;
    background: var(--warm-white);
    color: var(--text-dark);
    line-height: 1.8;
    overflow-x: hidden;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 250, 240, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--gold);
    padding: 0 5%;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 2rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 35px;
}

.nav-links a {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary);
    background: var(--cream);
}

.nav-links a.active {
    background: var(--gradient-gold);
    color: white;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-warm);
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(218, 165, 32, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(139, 69, 19, 0.08) 0%, transparent 50%);
    animation: heroFloat 20s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-30px, -20px) rotate(2deg); }
}

.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 900px;
    padding: 0 20px;
}

.hero-badge {
    display: inline-block;
    background: var(--gradient-gold);
    color: white;
    padding: 8px 24px;
    border-radius: 30px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 30px;
    animation: fadeInDown 1s ease;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 800;
    color: var(--dark-brown);
    line-height: 1.1;
    margin-bottom: 25px;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-title span {
    color: var(--primary);
    position: relative;
}

.hero-title span::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-gold);
    border-radius: 2px;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-light);
    margin-bottom: 40px;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.6s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 35px;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-gold);
    color: white;
    box-shadow: 0 8px 25px rgba(218, 165, 32, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(218, 165, 32, 0.4);
}

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

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

/* ============================================
   SECTION STYLES
   ============================================ */
.section {
    padding: 100px 5%;
    position: relative;
}

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

.section-label {
    display: inline-block;
    background: var(--cream);
    color: var(--primary);
    padding: 6px 20px;
    border-radius: 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--dark-brown);
    margin-bottom: 20px;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* ============================================
   STORY CARDS
   ============================================ */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.story-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px var(--shadow);
    transition: all 0.4s ease;
    position: relative;
}

.story-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(139, 69, 19, 0.2);
}

.story-card-img {
    height: 220px;
    background: var(--gradient-warm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    position: relative;
    overflow: hidden;
}

.story-card-img::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.1) 0%, rgba(218, 165, 32, 0.1) 100%);
}

.story-card-content {
    padding: 25px;
}

.story-card-category {
    display: inline-block;
    background: var(--cream);
    color: var(--primary);
    padding: 4px 14px;
    border-radius: 15px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.story-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-brown);
    margin-bottom: 10px;
    line-height: 1.3;
}

.story-card-excerpt {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.7;
}

.story-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f0e6d3;
}

.story-card-date {
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    color: var(--text-light);
}

.story-card-read {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s ease;
}

.story-card-read:hover {
    gap: 10px;
}

/* ============================================
   MEMORY CARDS
   ============================================ */
.memories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1400px;
    margin: 0 auto;
}

.memory-card {
    background: white;
    border-radius: 20px;
    padding: 35px 30px;
    box-shadow: 0 8px 30px var(--shadow);
    transition: all 0.4s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.memory-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-gold);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.memory-card:hover::before {
    transform: scaleX(1);
}

.memory-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(139, 69, 19, 0.2);
}

.memory-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: inline-block;
    animation: bounce 2s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.memory-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--dark-brown);
    margin-bottom: 12px;
}

.memory-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* ============================================
   GALLERY
   ============================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 4/3;
    background: var(--gradient-warm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    cursor: pointer;
    transition: all 0.4s ease;
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 40px var(--shadow);
}

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(62, 39, 35, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    color: white;
    padding: 20px;
    text-align: center;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-overlay h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.gallery-item-overlay p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ============================================
   STATS SECTION
   ============================================ */
.stats-section {
    background: var(--dark-brown);
    color: white;
    padding: 80px 5%;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.stat-item {
    padding: 20px;
}

.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 10px;
}

.stat-label {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    opacity: 0.9;
}

/* ============================================
   TESTIMONIALS
   ============================================ */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.testimonial-card {
    background: white;
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 8px 30px var(--shadow);
    position: relative;
}

.testimonial-card::before {
    content: '"';
    font-family: 'Playfair Display', serif;
    font-size: 5rem;
    color: var(--gold);
    opacity: 0.3;
    position: absolute;
    top: 10px;
    left: 20px;
    line-height: 1;
}

.testimonial-text {
    font-size: 1.05rem;
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 25px;
    font-style: italic;
    position: relative;
    z-index: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.testimonial-info h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-brown);
}

.testimonial-info span {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ============================================
   NEWSLETTER
   ============================================ */
.newsletter-section {
    background: var(--gradient-warm);
    padding: 80px 5%;
    text-align: center;
}

.newsletter-box {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 50px 40px;
    border-radius: 25px;
    box-shadow: 0 15px 50px var(--shadow);
}

.newsletter-box h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--dark-brown);
    margin-bottom: 15px;
}

.newsletter-box p {
    color: var(--text-light);
    margin-bottom: 30px;
}

.newsletter-form {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.newsletter-form input {
    flex: 1;
    min-width: 250px;
    padding: 15px 25px;
    border: 2px solid #e8dcc8;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.newsletter-form input:focus {
    border-color: var(--gold);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--dark-brown);
    color: white;
    padding: 80px 5% 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    max-width: 1400px;
    margin: 0 auto 50px;
}

.footer-brand h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--gold);
}

.footer-brand p {
    opacity: 0.8;
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--gold);
    transform: translateY(-3px);
}

.footer-links h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: var(--gold);
}

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

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

.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.7;
    font-size: 0.9rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

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

    .hero-title {
        font-size: 2.5rem;
    }

    .section {
        padding: 60px 5%;
    }

    .stories-grid,
    .memories-grid,
    .gallery-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--cream);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* ============================================
   LOADING ANIMATION
   ============================================ */
.page-loader {
    position: fixed;
    inset: 0;
    background: var(--warm-white);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

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

.loader-book {
    font-size: 4rem;
    animation: bookFlip 1.5s ease infinite;
}

@keyframes bookFlip {
    0%, 100% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
}

.loader-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--primary);
    margin-top: 15px;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-gold);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 5px 20px rgba(218, 165, 32, 0.4);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(218, 165, 32, 0.5);
}
