/* ===== GLOBAL RESET & VARIABLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gold: #D4AF37;
    --secondary-gold: #C5A028;
    --royal-blue: #1e3a8a;
    --dark-bg: #0a0a0a;
    --dark-gray: #1a1a1a;
    --light-gray: #f5f5f5;
    --white: #ffffff;
    --text-dark: #333333;
    --text-light: #666666;
    --transition: all 0.4s ease;
}

/* ===== FIX FOR RIGHT SIDE WHITE SPACE ===== */
html, body {
    overflow-x: hidden;
    width: 100%;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== 1. GALLERY HERO SECTION ===== */
.gallery-hero {
    height: 60vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30,58,138,0.95) 0%, rgba(59,130,246,0.95) 50%, rgba(30,58,138,0.95) 100%), 
                url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="pattern" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="2" fill="rgba(212,175,55,0.2)"/></pattern></defs><rect width="100%" height="100%" fill="url(%23pattern)"/></svg>');
    filter: blur(0px);
}

.hero-content {
    text-align: center;
    color: var(--white);
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: 56px;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 22px;
    opacity: 0.95;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.3);
}

/* ===== 2. FILTERABLE GALLERY ===== */
.gallery-section {
    padding: 80px 0;
    background: var(--light-gray);
}

.filter-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 25px;
    background: var(--white);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 50px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
}

.filter-btn i {
    font-size: 16px;
}

.filter-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
    border-color: var(--primary-gold);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-gold), var(--secondary-gold));
    color: var(--white);
    border-color: var(--primary-gold);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    cursor: pointer;
    background: var(--white);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    height: 350px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: var(--white);
    font-size: 40px;
    transform: scale(0.8);
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay i {
    transform: scale(1);
}

/* Gallery Filter Animation */
.gallery-item.hide {
    opacity: 0;
    transform: scale(0.8);
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* ===== 3. LIGHTBOX MODAL ===== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        transform: scale(0.9) translateY(30px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--white);
    color: var(--white);
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    transition: var(--transition);
    z-index: 10000;
}

.lightbox-close:hover {
    background: var(--primary-gold);
    border-color: var(--primary-gold);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--white);
    color: var(--white);
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    transition: var(--transition);
    z-index: 10000;
}

.lightbox-nav:hover {
    background: var(--primary-gold);
    border-color: var(--primary-gold);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

/* ===== 4. CTA DOWNLOAD SECTION ===== */
.cta-download-section {
    padding: 80px 0;
    background: var(--light-gray);
    position: relative;
    overflow: hidden;
}

.cta-download-section::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(212,175,55,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.cta-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 42px;
    color: var(--royal-blue); /* Dark Color */
    margin-bottom: 15px;
    text-shadow: none; /* Shadow hatayi */
}

.cta-subtitle {
    font-size: 18px;
    color: var(--text-light); /* Dark Color */
    margin-bottom: 40px;
}

.cta-form {
    max-width: 1100px;
    margin: 0 auto;
}

.cta-form-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 15px;
    align-items: end;
}

.cta-field {
    position: relative;
}

.floating-label {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 15px;
    transition: var(--transition);
    pointer-events: none;
    background: var(--white); /* White bg taaki line cut kare */
    padding: 0 5px;
}

.cta-field input:focus + .floating-label,
.cta-field input:not(:placeholder-shown) + .floating-label,
.cta-field select:focus + .floating-label,
.cta-field select:not([value=""]) + .floating-label {
    top: 0;
    font-size: 12px;
    color: var(--primary-gold);
}

.cta-field input,
.cta-field select {
    width: 100%;
    padding: 18px 20px;
    /* Border visible banayi light background ke liye */
    border: 2px solid rgba(212, 175, 55, 0.3); 
    border-radius: 12px;
    background: var(--white);
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    color: var(--text-dark);
    transition: var(--transition);
}

.cta-field input::placeholder {
    color: transparent;
}

.cta-field input:focus,
.cta-field select:focus {
    outline: none;
    border-color: var(--primary-gold);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

/* Select Dropdown Arrow */
.cta-field select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E"); /* Arrow color dark kiya */
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.cta-submit-btn {
    padding: 18px 40px;
    background: linear-gradient(135deg, var(--primary-gold), var(--secondary-gold));
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

.cta-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(212, 175, 55, 0.6), 0 0 30px rgba(212, 175, 55, 0.3);
    background: linear-gradient(135deg, var(--secondary-gold), var(--primary-gold));
}

.cta-submit-btn i {
    font-size: 18px;
}

.cta-message {
    margin-top: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-10px);
    transition: var(--transition);
}

.cta-message.show {
    opacity: 1;
    transform: translateY(0);
}

.cta-message.success {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 2px solid rgba(34, 197, 94, 0.3);
}

.cta-message.error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 2px solid rgba(239, 68, 68, 0.3);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 968px) {
    .gallery-hero {
        height: 50vh;      /* Height 50% kar di */
        min-height: 400px; /* Safety height */
    }

    .hero-content h1 {
        font-size: 40px;
    }

    .hero-content p {
        font-size: 18px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cta-form-fields {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    /* 1. Name Field (1st Item): Full Width (Upar akela rahega) */
.cta-field:nth-child(1) {
    grid-column: 1 / -1;
}

/* 2. Phone Field (2nd Item): Automatic (Left side me aayega) */
.cta-field:nth-child(2) {
    grid-column: auto;
}

/* 3. Function Type (3rd Item): Automatic (Right side me aayega) */
.cta-field:nth-child(3) {
    grid-column: auto;
}

/* 4. Button (Last Item): Full Width (Sabse niche) */
.cta-field:last-child {
    grid-column: 1 / -1;
    margin-top: 10px; /* Thoda gap button ke upar */
}

/* Button ko center karne ke liye */
.cta-submit-btn {
    width: 100%;
    justify-content: center;
}
}

@media (max-width: 768px) {
    .gallery-hero {
        height: 25vh;
    }

    .hero-content h1 {
        font-size: 36px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-item {
        height: 300px;
    }

    .cta-content h2 {
        font-size: 32px;
    }

    .cta-subtitle {
        font-size: 16px;
    }

    .cta-form-fields {
        grid-template-columns: 1fr;
    }

    .cta-field:last-child {
        grid-column: 1;
    }

    .lightbox-close,
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;
    }

    .lightbox-prev {
        left: 15px;
    }

    .lightbox-next {
        right: 15px;
    }
}

@media (max-width: 480px) {

    .gallery-hero {
        height: 35vh !important; /* Hero height compact ki gayi */
        min-height: 200px;
    }

    .gallery-section, 
    .cta-download-section {
        padding: 50px 0 !important;
    }

    .cta-download-section {
        padding-bottom: 20px !important;
        }

    .hero-content h1 {
        font-size: 30px !important; /* Requirement: 30px */
        line-height: 1.4 !important; /* Requirement: 1.4 */
    }

    .hero-content p {
        font-size: 14px !important; /* Requirement: 14px for Sub-headings */
    }

    /* 3. Global H2 Size */
    .cta-content h2 {
        font-size: 26px !important; /* Requirement: 26px */
        line-height: 1.4 !important;
    }

    .cta-subtitle {
        font-size: 14px !important; /* Requirement: 14px */
    }

    p {
        font-size: 16px !important; /* Requirement: 16px */
    }

    .filter-container {
        gap: 10px;
    }

    .filter-btn {
        padding: 10px 15px;
    }

    .gallery-item {
        height: 250px;
    }

    .cta-field input,
    .cta-field select,
    .cta-submit-btn {
        padding: 15px 18px;
        font-size: 14px;
    }
}

/* ===== SPECIFIC FIX FOR TABLET PORTRAIT & iPAD PRO (800px to 1366px) ===== */
@media (min-width: 800px) and (max-width: 1366px) {
    
    .gallery-hero {
        height: 40vh;      /* Default 60vh tha, ab 40vh kar diya */
        min-height: 300px; /* Safety height */
    }

    /* Text size thoda adjust kiya taaki kam height me fit aaye */
    .hero-content h1 {
        font-size: 45px;   
        margin-bottom: 10px;
    }

    .hero-content p {
        font-size: 18px;
    }
}