/* --- UNIVERSAL MOBILE CENTER FIX: Counter Title + 2x2 Grid --- */
@media (max-width: 768px) {
    .counter-section {
        display: block !important;
    }

    .countdown-container,
    .counter-container,
    #countdown,
    .stats-container,
    .counter-wrapper {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        padding: 15px !important;
        width: 100% !important;
        max-width: 360px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        justify-items: center !important;
        align-items: stretch !important;
        box-sizing: border-box !important;
    }

    .counter-section h2,
    .stats-container h2,
    .counter-wrapper h2 {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        justify-self: center !important;
        text-align: center !important;
        margin: 0 0 12px 0 !important;
        background: transparent !important;
        border: none !important;
    }

    .time-box,
    .counter-item,
    .counter-box,
    .countdown-item,
    .stat-item {
        width: 100% !important;
        max-width: 160px !important;
        min-width: 140px !important;
        min-height: 100px !important;
        padding: 12px !important;
        border-radius: 16px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        justify-content: center !important;
        align-items: center !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .time-box span,
    .counter-value,
    .counter-number,
    .time-value,
    .stat-number {
        font-size: 2.2rem !important;
        line-height: 1 !important;
        font-weight: 700 !important;
        margin-bottom: 6px !important;
    }

    .time-box p,
    .counter-label,
    .time-label,
    .stat-label,
    .label {
        font-size: 0.8rem !important;
        letter-spacing: 1px !important;
        text-transform: uppercase !important;
        opacity: 0.9 !important;
        margin: 0 !important;
        white-space: nowrap !important;
    }
}

/* --- GLOBAL MOBILE FIX: 2x2 Grid Layout (Forced Standard) --- */
@media (max-width: 768px) {

    .counter-section,
    .counter-wrapper,
    .stats-container,
    #countdown,
    .countdown-container {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        padding: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 auto !important;
        justify-content: center !important;
        height: auto !important;
    }

    .counter-box,
    .stat-item,
    .time-box,
    .countdown-item {
        width: 100% !important;
        margin: 0 !important;
        padding: 10px 5px !important;
        min-height: 100px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        box-sizing: border-box !important;
        border-radius: 15px !important;
    }

    .count,
    .number,
    .stat-number,
    .counter-number,
    .time-value {
        font-size: 2.2rem !important;
        line-height: 1 !important;
        margin-bottom: 5px !important;
        font-weight: 700 !important;
    }

    .label,
    .stat-label,
    .counter-label,
    .time-label {
        font-size: 0.8rem !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        opacity: 0.9 !important;
        white-space: nowrap !important;
    }
}

/* Mobile grid title span fix */
@media (max-width: 768px) {

    .counter-section h2,
    .stats-container h2,
    .counter-wrapper h2 {
        grid-column: 1 / -1 !important;
        justify-self: center !important;
        text-align: center !important;
        margin-bottom: 12px !important;
    }
}

:root {
    /* Enchanted Forest Palette */
    --primary-color: #1a472a;
    /* Deep Emerald */
    --secondary-color: #f4f8f4;
    /* Sage Mist White */
    --accent-color: #d4af37;
    /* Soft Gold */
    --text-dark: #2c3e50;
    /* Deep Charcoal */
    --text-light: #fff;
    --card-bg: rgba(255, 255, 255, 0.9);
    --font-script: 'Dancing Script', cursive;
    --font-main: 'Montserrat', sans-serif;
    --shadow-soft: 0 10px 30px rgba(26, 71, 42, 0.15);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    background-color: #f4f8f4;
    color: var(--text-dark);
    overflow-x: hidden;
    line-height: 1.6;
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Soft, Premium Nature Gradient - Breathing Animation */
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 50%, #e8f5e9 100%);
    background-size: 400% 400%;
    animation: natureBreath 15s ease infinite;
}

/* Removed heavy firefly animations for simplicity */

@keyframes natureBreath {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Decorative leaf overlay - Subtle & Static */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%231a472a' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: -1;
    pointer-events: none;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 20px;
}

.title {
    font-family: var(--font-script);
    font-size: 5.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    animation: fadeInDown 2s ease;
    text-shadow: 2px 2px 0px rgba(212, 175, 55, 0.2);
    position: relative;
}

.title::after {
    content: '';
    display: block;
    width: 100px;
    height: 3px;
    background: var(--accent-color);
    margin: 10px auto;
    border-radius: 2px;
    opacity: 0.7;
}

.subtitle {
    font-size: 1.6rem;
    font-weight: 300;
    color: #4a6fa5;
    animation: fadeInUp 2s ease 0.5s forwards;
    opacity: 0;
    letter-spacing: 1px;
}

.scroll-down {
    position: absolute;
    bottom: 40px;
    font-size: 2rem;
    color: var(--primary-color);
    animation: bounce 2s infinite;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.scroll-down:hover {
    color: var(--accent-color);
}

/* Glass Cards */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 40px;
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    margin: 20px auto;
    /* Ensures centering */
    max-width: 900px;
    width: 100%;
    /* Ensure full width up to max-width */
    box-sizing: border-box;
    /* Prevent padding overflow */
    transition: var(--transition-smooth);
    display: flex;
    /* Flex to center content */
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.glass-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(26, 71, 42, 0.2);
}

.gallery-section,
.story-section,
.timeline-section,
.video-section,
.counter-section,
.faq-section {
    padding: 100px 20px;
    text-align: center;
    /* Centers inline-block headers */
}

h2 {
    font-family: var(--font-script);
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    display: block;
    /* Ensure full width for centering */
}

h2::before,
h2::after {
    content: '🍃';
    font-size: 0.6em;
    vertical-align: middle;
    margin: 0 15px;
    opacity: 0.8;
}

/* Timeline */
.timeline-section {
    position: relative;
}

.timeline {
    position: relative;
    max-width: 900px;
    /* Standardized to match Glass Card & Counter */
    margin: 0 auto;
}

/* Vertical Line */
.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: var(--primary-color);
    /* Green line */
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
    opacity: 0.8;
    /* Increased opacity for visibility */
}

/* Container */
.timeline-container {
    padding: 10px 40px;
    position: relative;
    background: inherit;
    width: 50%;
    box-sizing: border-box;
}

/* Sides */
.left {
    left: 0;
}

.right {
    left: 50%;
}

/* Dots */
.timeline-container::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background: #fff;
    border: 4px solid var(--accent-color);
    top: 20px;
    border-radius: 50%;
    z-index: 1;
    transition: var(--transition-smooth);
}

.right::after {
    left: -10px;
}

.timeline-container:hover::after {
    background: var(--primary-color);
    transform: scale(1.2);
}

/* Content */
.timeline-content {
    padding: 25px;
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    position: relative;
    transition: var(--transition-smooth);
    text-align: left;
    /* Resets alignment for text inside timeline */
}

/* Arrows */
.left::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    right: 30px;
    border: medium solid white;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent white;
}

.right::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    left: 30px;
    border: medium solid white;
    border-width: 10px 10px 10px 0;
    border-color: transparent white transparent transparent;
}

.timeline-content:hover {
    transform: translateY(-5px);
}

.timeline-content img {
    width: 100%;
    max-height: 180px;
    /* Fixed height to prevent stretching */
    object-fit: cover;
    /* Crop to maintain aspect ratio */
    border-radius: 12px;
    margin-bottom: 15px;
    transition: transform 0.5s ease;
}

.timeline-content:hover img {
    transform: scale(1.02);
}

.timeline-text h3 {
    color: var(--primary-color);
    font-family: var(--font-script);
    font-size: 2rem;
    margin-top: 0;
}

/* Counter */
.counter-section {
    background: linear-gradient(135deg, #fff 0%, #f4f8f4 100%);
    border-radius: 30px;
    box-shadow: var(--shadow-soft);
    max-width: 800px;
    /* Expanded to 800px to prevent wrapping */
    width: 100%;
    /* Ensure full width */
    box-sizing: border-box;
    margin: 20px auto;
}

/* Force Video Wrapper to match Counter */
.video-wrapper {
    max-width: 800px !important;
    margin: 0 auto;
}

.countdown-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.time-box {
    background: #fff;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    flex: 1;
    min-width: 100px;
    /* Reduced from 120px to prevent wrap */
    padding: 15px;
    /* Reduced padding */
}

.time-box span {
    font-size: 3rem;
    color: var(--primary-color);
    text-shadow: none;
    display: block;
}

.time-box p {
    color: var(--accent-color);
    font-weight: 600;
    letter-spacing: 2px;
    margin-top: 5px;
}

/* Buttons */
.love-btn,
#new-note-btn {
    background: var(--primary-color);
    color: white;
    font-family: var(--font-main);
    padding: 14px 40px;
    /* Reduced padding */
    border: none;
    border-radius: 50px;
    font-size: 1.05rem;
    /* Slightly smaller font */
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(26, 71, 42, 0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.love-btn:hover,
#new-note-btn:hover {
    background: #143620;
    /* Darker emerald */
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(26, 71, 42, 0.4);
}

.heart-container {
    padding: 80px 20px;
    text-align: center;
}

/* Footer */
footer {
    padding: 40px 20px;
    background: var(--primary-color);
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* Music Player */
.music-player {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.vinyl-record {
    width: 60px;
    height: 60px;
    background: #1a472a;
    border: 3px solid var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.vinyl-record:hover {
    transform: scale(1.1);
}

.vinyl-record i {
    color: var(--accent-color);
}

.rotating {
    animation: spin 5s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

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

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* --- MOBILE RESPONSIVENESS (TIMELINE & GENERAL) --- */
@media screen and (max-width: 600px) {

    /* Timeline adjustments */
    .timeline::after {
        left: 31px;
    }

    .timeline-container {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    /* Arrows for mobile */
    .timeline-container::before {
        left: 60px;
        border: medium solid white;
        border-width: 10px 10px 10px 0;
        border-color: transparent white transparent transparent;
    }

    .left::after,
    .right::after {
        left: 15px;
    }

    .right {
        left: 0%;
    }

    .timeline-content img {
        width: 100%;
        border-radius: 8px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

    .title {
        font-size: 3.5rem !important;
    }

    .glass-card {
        padding: 25px;
    }

    h2 {
        font-size: 2.5rem;
    }

    h2::before,
    h2::after {
        display: none;
    }
}