/* ==================== ROOT VARIABLES ==================== */
:root {
    --primary-dark: #1a0f08;
    --primary-color: #2c1810;
    --secondary-color: #d4af37;
    --accent-color: #f5e6d3;
    --text-color: #333;
    --light-bg: #faf8f3;
    --white: #fff;
    --gold-light: #e8dcc4;
    --rose: #c4747c;
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ==================== GLOBAL STYLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cormorant Garamond', serif;
    color: var(--text-color);
    background-color: var(--light-bg);
    line-height: 1.8;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

html {
    scroll-behavior: smooth;
}

/* ==================== PAGE TRANSITION ==================== */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-dark);
    z-index: 9999;
    animation: pageTransitionOut 1s ease-out forwards;
}

@keyframes pageTransitionOut {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

/* ==================== CURSOR FOLLOWER ==================== */
.cursor-follower {
    position: fixed;
    width: 30px;
    height: 30px;
    border: 2px solid var(--secondary-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.5;
    display: none;
    transition: all 0.1s ease-out;
}

@media (min-width: 1024px) {
    .cursor-follower {
        display: block;
    }
}

/* ==================== FLOATING DECORATIONS ==================== */
.floating-flower {
    position: fixed;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, var(--secondary-color) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.1;
}

.flower-1 {
    top: 10%;
    left: 5%;
    animation: float 6s ease-in-out infinite;
}

.flower-2 {
    top: 60%;
    right: 10%;
    animation: float 8s ease-in-out infinite;
}

.flower-3 {
    bottom: 20%;
    left: 15%;
    animation: float 7s ease-in-out infinite;
}

.flower-4 {
    top: 40%;
    right: 5%;
    animation: float 9s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* ==================== HERO SECTION ==================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 50%, #3d2817 100%);
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0) 0%, rgba(0,0,0,0.3) 100%);
    z-index: 1;
}

/* Animated Background Gradients */
.animated-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    overflow: hidden;
}

.gradient-1, .gradient-2, .gradient-3 {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    filter: blur(80px);
}

.gradient-1 {
    width: 400px;
    height: 400px;
    background: var(--secondary-color);
    top: -100px;
    left: -100px;
    animation: moveGradient1 15s ease-in-out infinite;
}

.gradient-2 {
    width: 300px;
    height: 300px;
    background: var(--rose);
    top: 50%;
    right: -50px;
    animation: moveGradient2 20s ease-in-out infinite;
}

.gradient-3 {
    width: 350px;
    height: 350px;
    background: var(--secondary-color);
    bottom: -100px;
    right: 10%;
    animation: moveGradient3 18s ease-in-out infinite;
}

@keyframes moveGradient1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(50px, 50px); }
}

@keyframes moveGradient2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-50px, 50px); }
}

@keyframes moveGradient3 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-30px, -30px); }
}

.hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ==================== SAVE THE DATE BADGE ==================== */
.save-date-badge {
    position: relative;
    margin-bottom: 3rem;
}

.badge-text {
    font-family: 'Playfair Display', serif;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--secondary-color);
    text-transform: uppercase;
    display: block;
    text-align: center;
}

.badge-decoration {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
    margin: 0.8rem auto;
    animation: expand 1s ease-out;
}

@keyframes expand {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 60px;
        opacity: 1;
    }
}

/* ==================== INVITATION CARD ==================== */
.invitation-card {
    position: relative;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--gold-light) 50%, var(--accent-color) 100%);
    max-width: 700px;
    width: 100%;
    padding: 5rem 3.5rem;
    border-radius: 20px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(212, 175, 55, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 2px solid var(--secondary-color);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.card-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(212, 175, 55, 0.05) 0%, transparent 50%);
    z-index: 1;
}

.invitation-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

/* Shimmer Effect */
.card-shimmer {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: translate(-100%, -100%) rotate(45deg);
    }
    100% {
        transform: translate(100%, 100%) rotate(45deg);
    }
}

/* Card Decorations */
.card-decoration-top,
.card-decoration-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.decoration-line {
    flex: 1;
    height: 1px;
    background: var(--secondary-color);
    max-width: 40px;
}

.decoration-circle {
    width: 8px;
    height: 8px;
    background: var(--secondary-color);
    border-radius: 50%;
}

/* Join Us Section */
.join-us-wrapper {
    margin-bottom: 1.5rem;
}

.join-us {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: var(--primary-color);
    letter-spacing: 2px;
    font-weight: 700;
}

.underline {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
    margin: 0.8rem auto;
    border-radius: 2px;
}

/* Names Section */
.names-section {
    margin: 2rem 0;
}

.name-wrapper {
    position: relative;
    margin: 1rem 0;
}

.bride-name,
.groom-name {
    font-family: 'Playfair Display', serif;
    font-size: 3.2rem;
    color: var(--primary-color);
    font-weight: 900;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
}

.name-accent {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
    border-radius: 2px;
}

.and-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--secondary-color);
}

.and {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-style: italic;
    color: var(--primary-color);
    margin: 0 0.5rem;
}

.heart-icon {
    width: 24px;
    height: 24px;
    color: var(--secondary-color);
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.2);
    }
    50% {
        transform: scale(1);
    }
}

/* Subtitle */
.subtitle-wrapper {
    margin: 2rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--secondary-color);
    border-bottom: 1px solid var(--secondary-color);
}

.subtitle {
    font-size: 0.9rem;
    color: var(--primary-color);
    letter-spacing: 2px;
    font-weight: 600;
    text-transform: uppercase;
}

.subtitle-decoration {
    width: 40px;
    height: 2px;
    background: var(--secondary-color);
    margin: 0.8rem auto;
}

/* Parents Section */
.parents-section {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin: 2rem 0;
    align-items: center;
}

.parent-group {
    flex: 1;
    text-align: center;
}

.parent-label {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
    letter-spacing: 0.5px;
    line-height: 1.6;
}

.parent-house {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-top: 0.3rem;
    font-style: italic;
}

.parent-divider {
    width: 1px;
    height: 40px;
    background: var(--secondary-color);
    opacity: 0.5;
}

/* Event Details Grid */
.event-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    margin: 2.5rem 0;
    padding: 2rem 0;
}

.event-box {
    background: rgba(255, 255, 255, 0.3);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.event-box:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.2);
}

.box-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 0.8rem;
    color: var(--secondary-color);
    stroke-width: 1.5;
}

.box-icon svg {
    width: 100%;
    height: 100%;
}

.event-label {
    font-size: 0.7rem;
    color: var(--primary-color);
    letter-spacing: 1px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.event-value {
    font-size: 0.95rem;
    color: var(--primary-color);
    font-weight: 600;
    line-height: 1.4;
}

.event-value.sub {
    font-size: 0.8rem;
    color: var(--text-color);
    opacity: 0.8;
}

.event-date-number {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--secondary-color);
    font-weight: 900;
    margin: 0.5rem 0;
}

/* Invitation Footer */
.invitation-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--secondary-color);
}

.footer-text {
    font-size: 0.85rem;
    color: var(--primary-color);
    letter-spacing: 2px;
    font-weight: 600;
}

.footer-names {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--primary-color);
    margin: 0.5rem 0;
    font-weight: 700;
}

.contact-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1rem;
}

.phone-icon {
    width: 20px;
    height: 20px;
    color: var(--secondary-color);
}

.contact-number {
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-weight: 700;
    letter-spacing: 1px;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    color: var(--secondary-color);
    opacity: 0.7;
}

.scroll-indicator svg {
    width: 100%;
    height: 100%;
    stroke-width: 2;
}

/* ==================== PHOTOS SECTION ==================== */
.photos-section {
    padding: 100px 2rem;
    background: linear-gradient(180deg, var(--white) 0%, var(--light-bg) 100%);
    position: relative;
}

.photos-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
}

.section-subtitle {
    font-size: 1.3rem;
    color: var(--secondary-color);
    margin-top: 1.5rem;
    letter-spacing: 1px;
    font-weight: 500;
}

/* Photos Container */
.photos-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto 5rem;
}

.photo-card {
    position: relative;
    overflow: hidden;
}

.photo-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 15px;
    aspect-ratio: 4/5;
}

.photo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.photo-card:hover .photo-image {
    transform: scale(1.08) rotate(1deg);
    filter: brightness(0.85);
}

.photo-frame {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 8px solid var(--gold-light);
    border-radius: 15px;
    box-shadow: 
        inset 0 0 0 2px var(--secondary-color),
        0 20px 40px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    z-index: 2;
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(44, 24, 16, 0.8) 0%, rgba(212, 175, 55, 0.3) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    z-index: 3;
}

.photo-card:hover .photo-overlay {
    opacity: 1;
}

.photo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--white);
    font-weight: 700;
    text-align: center;
    letter-spacing: 1px;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 3rem auto;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 1;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(44, 24, 16, 0.9) 0%, rgba(212, 175, 55, 0.2) 100%);
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-image {
    transform: scale(1.15) rotate(2deg);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* ==================== DETAILS SECTION ==================== */
.details-section {
    padding: 100px 2rem;
    background: linear-gradient(135deg, var(--light-bg) 0%, var(--white) 50%, var(--light-bg) 100%);
    position: relative;
}

.details-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
}

.details-container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Details Cards */
.details-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 4rem 0 3rem;
}

.detail-card {
    background: linear-gradient(135deg, var(--white) 0%, rgba(245, 230, 211, 0.5) 100%);
    padding: 3rem 2rem;
    text-align: center;
    border-radius: 15px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border-top: 4px solid var(--secondary-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.detail-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transition: var(--transition);
}

.detail-card:hover {
    transform: translateY(-15px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.detail-card:hover::before {
    right: -20%;
    top: -20%;
}

.card-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    color: var(--secondary-color);
    stroke-width: 1.5;
}

.card-icon svg {
    width: 100%;
    height: 100%;
}

.detail-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.detail-card p {
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.8;
    font-weight: 500;
}

.detail-sub {
    font-size: 0.95rem;
    color: var(--secondary-color);
    margin-top: 0.5rem;
    font-weight: 600;
}

/* Closing Message */
.closing-message {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--gold-light) 100%);
    padding: 3rem 2rem;
    text-align: center;
    border-radius: 15px;
    border-left: 4px solid var(--secondary-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.closing-message p {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: var(--primary-color);
    font-style: italic;
    font-weight: 500;
}

/* ==================== FOOTER ==================== */
.footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--accent-color);
    text-align: center;
    padding: 3rem 2rem;
    border-top: 2px solid var(--secondary-color);
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
}

.footer-text {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.footer-tagline {
    font-size: 0.95rem;
    color: var(--secondary-color);
    font-weight: 600;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 1024px) {
    .event-details-grid {
        grid-template-columns: 1fr;
    }

    .parents-section {
        flex-direction: column;
        gap: 1rem;
    }

    .parent-divider {
        width: 40px;
        height: 1px;
        transform: rotate(90deg);
    }
}

@media (max-width: 768px) {
    .invitation-card {
        padding: 3rem 2rem;
        max-width: 95%;
    }

    .bride-name,
    .groom-name {
        font-size: 2.2rem;
    }

    .and {
        font-size: 1.5rem;
    }

    .join-us {
        font-size: 1.6rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .section-subtitle {
        font-size: 1.1rem;
    }

    .photos-container {
        grid-template-columns: 1fr;
    }

    .detail-card {
        padding: 2rem 1.5rem;
    }

    .details-cards {
        grid-template-columns: 1fr;
    }

    .closing-message p {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .invitation-card {
        padding: 2rem 1.5rem;
        border-radius: 15px;
    }

    .bride-name,
    .groom-name {
        font-size: 1.8rem;
    }

    .and {
        font-size: 1.2rem;
    }

    .join-us {
        font-size: 1.3rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .event-details-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 1.5rem 0;
    }

    .event-box {
        padding: 1rem;
    }

    .parents-section {
        flex-direction: column;
        gap: 1rem;
        margin: 1.5rem 0;
    }

    .card-icon {
        width: 50px;
        height: 50px;
    }

    .detail-card h3 {
        font-size: 1.5rem;
    }

    .detail-card p {
        font-size: 1rem;
    }

    .photos-section,
    .details-section {
        padding: 50px 1rem;
    }

    .closing-message p {
        font-size: 1.2rem;
    }

    .footer {
        padding: 2rem 1rem;
    }
}