@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@700&family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #fceabb 0%, #f8b500 100%);
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #3a3a3a;
    min-height: 100vh;
    padding: 0;
    position: relative;
}

#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #8b0000, #b22222);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: white;
    font-size: 1.2rem;
    margin-top: 1rem;
    font-weight: 300;
    text-align: center;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.main-header {
    background: rgba(139, 0, 0, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    color: white;
    font-family: 'Dancing Script', cursive;
    font-size: 2.2rem;
    margin: 0;
}

.logo span {
    color: #f8b500;
}

.menu-toggle {
    display: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
    background: rgba(255, 255, 255, 0.2);
}

.breadcrumb {
    max-width: 1400px;
    margin: 1rem auto;
    padding: 0 2rem;
    color: #8b0000;
    font-weight: 500;
}

.breadcrumb a {
    color: #8b0000;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.hero-section {
    height: 70vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7)), url('wedding.jpeg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
}

.hero-content {
    max-width: 800px;
    padding: 2rem;
}

.main-title {
    font-size: 3.5rem;
    font-family: 'Dancing Script', cursive;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    font-weight: 300;
}

.scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-down a {
    color: white;
    font-size: 2rem;
    text-decoration: none;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-20px);}
    60% {transform: translateY(-10px);}
}

.event-hero {
    height: 40vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7)), url('wedding.jpeg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-bottom: 2rem;
}

.event-hero-content {
    max-width: 800px;
    padding: 2rem;
}

.event-title {
    font-size: 3rem;
    font-family: 'Dancing Script', cursive;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.event-subtitle {
    font-size: 1.3rem;
    font-weight: 300;
}

.section-header {
    text-align: center;
    padding: 3rem 1rem 1rem;
}

.section-header h2 {
    font-size: 3rem;
    color: #8b0000;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    font-family: 'Dancing Script', cursive;
    letter-spacing: 1px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #5a5a5a;
    max-width: 600px;
    margin: 0 auto;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.iru {
    display: block;
    text-align: center;
    font-size: 2.8rem;
    color: #fff;
    margin: 1.5rem auto;
    background: linear-gradient(135deg, #8b0000, #b22222);
    border-radius: 15px;
    padding: 1.5rem 2.5rem;
    width: fit-content;
    box-shadow: 0 10px 25px rgba(139, 0, 0, 0.3);
    transition: all 0.4s ease;
    font-family: 'Dancing Script', cursive;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
}

.iru::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.iru:hover::before {
    left: 100%;
}

.iru:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(139, 0, 0, 0.4);
}

.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1.5rem;
    max-width: 1400px;
    margin: 0 auto 3rem;
}

.container .card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 0;
    margin: 0;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
}

.container .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

.card-image {
    position: relative;
    overflow: hidden;
}

.container .card img,
.container .card video {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.container .card video {
    height: 80vh;
}

.card-image:hover img {
    transform: scale(1.1);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(139, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0 !important;
    transition: opacity 0.3s ease;
    display: none !important;
    pointer-events: none;
}

.card-image:hover .overlay {
    opacity: 0 !important;
    display: none !important;
}

.overlay i {
    color: white;
    font-size: 3rem;
}

.card-content {
    padding: 1.5rem;
    text-align: center;
}

.card-content h3 {
    color: #8b0000;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.card-content p {
    color: #5a5a5a;
    font-size: 1rem;
}

.container .card a {
    display: block;
    flex-grow: 1;
    text-decoration: none;
    color: inherit;
}

.pre1 {
    display: block;
    text-align: center;
    background: linear-gradient(to right, #fff, #fff9f9);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    padding: 1.2rem;
    font-size: 1.2rem;
    color: #8b0000;
    font-weight: 600;
    margin-top: auto;
    transition: all 0.3s ease;
    border: 1px solid rgba(139, 0, 0, 0.1);
}

.pre1:hover {
    background: linear-gradient(to right, #fff0f0, #ffebeb);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(139, 0, 0, 0.15);
}

.download-btn {
    display: inline-block;
    background: linear-gradient(135deg, #8b0000, #b22222);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    margin-top: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(139, 0, 0, 0.2);
    text-align: center;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.download-btn:hover {
    background: linear-gradient(135deg, #b22222, #8b0000);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(139, 0, 0, 0.3);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    overflow: auto;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
}

.modal:before {
    content: "";
    display: inline-block;
    height: 100%;
    vertical-align: middle;
}

.modal-content {
    background-color: #fff;
    display: inline-block;
    vertical-align: middle;
    margin: 0 auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 1000px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: zoomIn 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
    text-align: left;
}

@keyframes zoomIn {
    from {transform: scale(0.8); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

.close {
    color: #aaa;
    float: right;
    font-size: 2.5rem;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 10px;
    cursor: pointer;
    z-index: 1001;
}

.close:hover,
.close:focus {
    color: #8b0000;
}

.modal-content img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-top: 1rem;
    display: block;
    max-height: 70vh;
    object-fit: contain;
}

.gallery-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.nav-btn {
    background: linear-gradient(135deg, #8b0000, #b22222);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
    justify-content: center;
}

.nav-btn:hover {
    background: linear-gradient(135deg, #b22222, #8b0000);
    transform: translateY(-3px);
}

@media screen and (max-width: 768px) {
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
    
    .gallery-nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-btn {
        width: 100%;
    }
}

.footer {
    background: rgba(139, 0, 0, 0.95);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-5px);
    color: #f8b500;
}

.footer a {
    color: #f8b500;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #8b0000, #b22222);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    z-index: 999;
    border: none;
}

.back-to-top.show {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background: linear-gradient(135deg, #b22222, #8b0000);
    transform: translateY(-5px) !important;
}

@media screen and (max-width: 1024px) {
    .container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    h2 {
        font-size: 2.5rem;
    }
    
    .iru {
        font-size: 2.3rem;
        padding: 1.2rem 2rem;
    }
    
    .main-title {
        font-size: 2.8rem;
    }
    
    .event-title {
        font-size: 2.5rem;
    }
}

@media screen and (max-width: 768px) {
    h2 {
        font-size: 2.2rem;
    }
    
    .iru {
        font-size: 2rem;
        padding: 1rem 1.8rem;
    }
    
    .container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.2rem;
        padding: 1rem;
    }
    
    .container .card img {
        height: 220px;
    }

    .container .card video{
        height: auto;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-section {
        height: 60vh;
    }
    
    .main-title {
        font-size: 2.3rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .event-hero {
        height: 30vh;
    }
    
    .event-title {
        font-size: 2rem;
    }
    
    .event-subtitle {
        font-size: 1.1rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .gallery-nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media screen and (max-width: 480px) {
    body {
        padding: 0;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .iru {
        font-size: 1.7rem;
        padding: 0.8rem 1.2rem;
    }
    
    .container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .container .card img {
        height: 250px;
    }

    .container .card video{
        height: auto;
    }
    
    .pre1 {
        font-size: 1.1rem;
        padding: 1rem;
    }
    
    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    .event-title {
        font-size: 1.8rem;
    }
    
    .menu-toggle {
        display: block;
        position: absolute;
        top: 1.5rem;
        right: 2rem;
    }
    
    .main-nav {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(139, 0, 0, 0.95);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: all 0.4s ease;
        text-align: center;
        padding: 2rem 0;
        z-index: 1000;
    }
    
    .main-nav.mobile-menu-active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav a {
        display: block;
        padding: 1rem;
        font-size: 1.1rem;
    }
}

/* Fix for invitation page image and wedding video display */
.invitation-card .card-image img,
.wedding-video-card .card-image video {
    height: auto;
    max-height: 600px;
    object-fit: contain;
}

@media screen and (max-width: 768px) {
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
    
    .gallery-nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-btn {
        width: 100%;
    }
    
    .invitation-card .card-image img,
    .wedding-video-card .card-image video {
        max-height: 400px;
    }
}