/* Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Lato', sans-serif;
    color: #fff;
    background-color: #111;
    overflow-x: hidden;
    line-height: 1.6;
    font-size: 16px;
    /* Base font size */
    -webkit-font-smoothing: antialiased;
    /* Smoother fonts on Mac/iOS */
}

h1,
h2,
h3,
h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Background Video */
#bg-video {
    position: fixed;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
    width: 100%;
    /* Ensure coverage */
    height: 100%;
    /* Ensure coverage */
    z-index: -2;
    object-fit: cover;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    /* Dark overlay */
    z-index: -1;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
    width: 100%;
}

/* Header */
.main-header {
    text-align: center;
    padding: 60px 0 30px;
    animation: fadeInDown 1s ease-out;
}

.main-header h1 {
    /* Fluid typography: scales between 2.5rem and 4rem based on viewport width */
    font-size: clamp(2.5rem, 5vw + 1rem, 4rem);
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 300;
    opacity: 0.9;
}

/* Bio Section */
.bio-section {
    display: flex;
    justify-content: center;
    margin: 40px 0;
    animation: fadeInUp 1s ease-out 0.5s backwards;
}

.bio-card {
    background: rgba(10, 25, 47, 0.85);
    /* Navy Blue with transparency */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* For Safari */
    padding: 40px;
    border-radius: 15px;
    max-width: 800px;
    width: 100%;
    /* Ensure it doesn't overflow container width */
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.bio-card h2 {
    margin-bottom: 20px;
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: #ffffff;
    /* Gold accent */
}

.bio-card p {
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    /* Readable text on all devices */
}

/* Gallery Navigation (Home) */
.gallery-nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    /* Allows wrapping on smaller screens */
    margin: 40px 0;
    animation: fadeInUp 1s ease-out 1s backwards;
}

.nav-card {
    position: relative;
    width: 300px;
    /* Base width for larger screens */
    flex: 0 1 300px;
    /* Allow shrinking if needed, but prefer 300px */
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.8s ease;
    z-index: 0;
}

.nav-card:hover .card-bg {
    transform: scale(1.1);
}

.card-content {
    position: relative;
    z-index: 1;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.4) 50%, transparent);
    width: 100%;
    padding: 30px 20px;
}

.card-content i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #ffffff;
}

.card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

/* Gallery Pages (Masonry Grid) */
.gallery-page-header {
    text-align: center;
    padding: 40px 0;
    background: rgba(0, 0, 0, 0.5);
    margin-bottom: 30px;
    border-radius: 8px;
    /* Slight radius for better look */
}

.gallery-grid {
    column-count: 3;
    column-gap: 20px;
    padding: 0 10px;
    /* Slight padding to prevent edge touching */
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    background: #222;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    -webkit-column-break-inside: avoid;
    /* Chrome/Safari */
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    display: block;
    height: auto;
}

.gallery-item-info {
    padding: 15px;
    text-align: center;
}

.gallery-item-info h4 {
    font-size: 1.1rem;
    color: #eee;
    margin-bottom: 5px;
}

/* Page Navigation Footer */
.page-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 40px 0;
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    /* Wrap buttons on small screens */
}

.btn {
    padding: 12px 25px;
    background: transparent;
    border: 2px solid #ffffff;
    color: #ffffff;
    border-radius: 25px;
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.btn:hover {
    background: #ffffff;
    color: #111;
}

.btn-home {
    border-color: #fff;
    color: #fff;
}

.btn-home:hover {
    background: #fff;
    color: #111;
}

/* Footer */
.main-footer {
    text-align: center;
    padding: 40px 0;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.designer {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.1rem;
    color: #ccc;
}

.ybu-logo {
    height: 100px;
    /* Slightly smaller base size */
    width: auto;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    margin-top: 10px;
}

/* Responsive & "Nizami" Tweaks */
@media (max-width: 900px) {
    .gallery-grid {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    .nav-card {
        /* On tablet/mobile, let cards take more width but keep aspect ratio sane */
        width: 100%;
        max-width: 400px;
        height: 350px;
        /* Slightly shorter on mobile */
    }

    .gallery-nav {
        flex-direction: column;
        align-items: center;
    }

    .bio-card {
        padding: 30px 20px;
        /* Less padding on sides */
    }
}

@media (max-width: 600px) {
    .container {
        padding: 15px;
        /* Less container padding */
        width: 100%;
    }

    .gallery-grid {
        column-count: 1;
    }

    .main-header {
        padding-top: 40px;
    }

    .main-header h1 {
        /* Fallback if clamp isn't supported, or specific tweak */
        font-size: 2.2rem;
    }

    .nav-card {
        height: 300px;
        /* Even shorter for small mobile screens to fit content */
        max-width: 100%;
    }

    .page-nav {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .btn {
        width: 100%;
        text-align: center;
        max-width: 300px;
    }

    .ybu-logo {
        height: 80px;
        /* Smaller logo */
    }
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}