/* =========================================
   DHAVAL TADVI - DARK GOLD BENTO THEME
   ========================================= */

:root {
    /* --- COLOR PALETTE --- */
    --bg-body: #05000a;
    /* Deepest Black/Violet */
    --bg-gradient: radial-gradient(circle at 50% 0%, #1a0b2e 0%, #05000a 80%);

    /* Glassmorphism Surface */
    --glass-surface: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 215, 0, 0.1);
    /* Gold Border */
    --glass-highlight: rgba(255, 215, 0, 0.05);

    /* Text */
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.6);

    /* Accent: GOLD */
    --accent-gold: #FFD700;
    --accent-glow: 0 0 20px rgba(255, 215, 0, 0.3);

    /* --- TYPOGRAPHY --- */
    --font-head: 'Archivo Black', sans-serif;
    --font-body: 'Lato', sans-serif;

    /* --- SPACING & UI --- */
    --gap: 20px;
    --radius: 24px;
    --container-width: 1200px;
}

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-body);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
}

/* UTILITIES */
a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

img {
    display: block;
    max-width: 100%;
}

.text-gold {
    color: var(--accent-gold);
}

/* --- MAIN GRID LAYOUT --- */
.wrapper {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 Columns */
    grid-auto-rows: minmax(180px, auto);
    /* Flexible rows */
    gap: var(--gap);
}

/* --- HEADER --- */
/* Spans full width, flex layout */
.header {
    grid-column: span 4;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0 30px;
}

.logo img {
    height: 45px;
}

.nav a {
    color: var(--text-muted);
    margin-left: 25px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav a:hover,
.nav a.active {
    color: var(--accent-gold);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.menu-toggle {
    display: none;
}

.btn-gold {
    background: var(--accent-gold);
    color: #000;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.8rem;
    box-shadow: var(--accent-glow);
    transition: 0.3s;
}

.btn-gold:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

/* --- CARD BASE --- */
.card {
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 30px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(15px);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-gold);
    background: var(--glass-highlight);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

/* Typography styles inside cards */
h1 {
    font-family: var(--font-head);
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 10px;
}

h2 {
    font-family: var(--font-head);
    font-size: 2rem;
    margin-bottom: 5px;
    line-height: 1;
}

h3 {
    font-family: var(--font-head);
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.card-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 5px var(--accent-gold));
}

.card-icon svg,
.card-icon img {
    width: 100%;
    height: 100%;
    fill: var(--accent-gold);
}

/* --- SPECIFIC CARDS (BENTO SLOTS) --- */

/* 1. HERO (Span 2x2) */
.card-hero {
    grid-column: span 2;
    grid-row: span 2;
    justify-content: flex-end;
    /* Text at bottom */
    background: radial-gradient(circle at top right, rgba(255, 215, 0, 0.1), transparent 60%);
    padding: 40px;
}

.card-hero .hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/Home page hero BG_opt.jpg');
    /* New Image */
    /* Fallback / Portrait */
    background-size: cover;
    background-position: center top;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0) 100%);
    /* Fade bottom part so text pops? No, lets fade TOP */
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    /* Actually, let's keep text clear */
    opacity: 0.4;
    z-index: 0;
    transition: 0.5s;
}

.card-hero:hover .hero-bg {
    opacity: 0.6;
    scale: 1.05;
}

.hero-content {
    position: relative;
    z-index: 2;
    margin-top: auto;
}

.hero-subtitle {
    color: var(--accent-gold);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: block;
}

/* 2. STATS (Span 1x2 - Vertical or 2x1 Horizontal?) Let's do 2 wide, 1 high NEXT to hero? No, User wanted "Fill". 
   Let's do: Hero(2x2). Stats(1x2 - Tall). Services List(1x2 - Tall).
*/
.card-stats {
    grid-column: span 1;
    grid-row: span 2;
    justify-content: space-between;
    text-align: center;
}

.stat-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-item:last-child {
    border: none;
    margin: 0;
    padding: 0;
}

.stat-num {
    font-family: var(--font-head);
    font-size: 2.5rem;
    color: var(--accent-gold);
    display: block;
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
}

/* 3. SERVICES LIST (Span 1x2) */
.card-services-list {
    grid-column: span 1;
    grid-row: span 2;
}

.skill-list li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.skill-list li:last-child {
    border: none;
}

.skill-tag {
    font-size: 0.7rem;
    padding: 2px 8px;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    border-radius: 10px;
}

/* 4. APPROACH (Span 4 - Row of 3) */
.section-label {
    grid-column: span 4;
    font-family: var(--font-head);
    font-size: 1.5rem;
    margin-top: 40px;
    margin-bottom: 10px;
    border-left: 5px solid var(--accent-gold);
    padding-left: 20px;
    color: #fff;
}

.card-approach {
    grid-column: span 4;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 0;
    /* Container is invisible, children are cards */
    background: none;
    border: none;
    backdrop-filter: none;
}

.card-approach:hover {
    transform: none;
    box-shadow: none;
    border: none;
}

/* Reset hover for container */

.mini-card {
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 30px;
    transition: 0.3s;
}

.mini-card:hover {
    border-color: var(--accent-gold);
    transform: translateY(-5px);
    background: var(--glass-highlight);
}

/* 5. SERVICE DETAILS (Span 4 - Row of 4) */
.card-details-grid {
    grid-column: span 4;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    background: none;
    border: none;
    padding: 0;
    backdrop-filter: none;
}

.card-details-grid:hover {
    transform: none;
    box-shadow: none;
    border: none;
}

.card-details-grid .mini-card {
    flex: 1 1 22%;
    min-width: 250px;
}

/* 6. SOCIALS / CTA */
.card-socials {
    grid-column: span 2;
    display: flex;
    justify-content: space-around;
    /* Will be overridden by inline style for column layout if needed, but keeping base clean */
    align-items: center;
}

.social-icon-link {
    font-size: 1.8rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon-link:hover {
    color: var(--accent-gold);
    transform: translateY(-3px) scale(1.1);
    filter: drop-shadow(0 0 8px var(--accent-gold));
}

.card-cta {
    grid-column: span 2;
    background: var(--accent-gold);
    color: #000;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.card-cta h2 {
    color: #000;
}

.card-cta:hover {
    background: #fff;
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .wrapper {
        grid-template-columns: 1fr 1fr;
    }

    .header {
        grid-column: span 2;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        position: relative;
        z-index: 2000;
        /* Force header above everything */
    }

    /* HAMBURGER MENU */
    .menu-toggle {
        display: block;
        font-size: 1.8rem;
        cursor: pointer;
        color: #fff;
        z-index: 1001;
        /* Ensure above nav */
    }

    .nav {
        flex-direction: column;
        width: 100%;
        background: rgba(0, 0, 0, 0.95);
        position: absolute;
        top: 70px;
        left: 0;
        padding: 20px 0;
        gap: 20px;
        display: none;
        z-index: 1000;
        border-bottom: 1px solid var(--accent-gold);
        border-radius: 0 0 20px 20px;
    }

    .nav.active {
        display: flex;
    }

    .nav a {
        margin: 0;
        padding: 10px 0;
        text-align: center;
        display: block;
    }

    .card-hero {
        grid-column: span 2;
        min-height: 400px;
    }

    .card-stats {
        grid-column: span 1;
        grid-row: span 1;
        flex-direction: row;
        flex-wrap: wrap;
        text-align: left;
    }

    .stat-item {
        flex: 1;
        border: none;
        margin-right: 10px;
    }

    .card-services-list {
        grid-column: span 1;
        grid-row: span 1;
    }

    .section-label {
        grid-column: span 2;
    }

    .card-approach {
        grid-column: span 2;
        grid-template-columns: 1fr;
    }

    .card-details-grid {
        grid-column: span 2;
        grid-template-columns: 1fr 1fr;
    }

    .card-socials {
        grid-column: span 2;
    }

    .card-cta {
        grid-column: span 2;
    }
}

@media (max-width: 600px) {
    .wrapper {
        display: flex;
        flex-direction: column;
    }

    .card-details-grid {
        display: flex;
        flex-direction: column;
    }

    .card-hero h1 {
        font-size: 2.5rem;
    }
}

/* END OF media (max-width: 600px) */

/* --- PERCENTAGE FILL SKILL CARDS (Section Hover Trigger) --- */
.skills-5-row {
    grid-column: span 4;
    /* FORCE FULL WIDTH */
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 50px;
    width: 100%;
}

.skill-card-percent {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    width: 100%;
    min-height: 220px;
    min-width: 150px;
    aspect-ratio: 4 / 5;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

.skill-card-percent:hover {
    transform: translateY(-5px);
    border-color: var(--accent-gold);
}

.percent-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: var(--accent-gold);
    opacity: 1;
    z-index: 1;
    transition: height 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

/* HOVER TRIGGER: Hovering the CONTAINER fills ALL cards */
.skills-5-row:hover .percent-fill {
    height: var(--fill-height);
}

.skill-content {
    position: relative;
    z-index: 2;
    text-align: center;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.9);
}

.skill-content img {
    width: 65px;
    height: 65px;
    margin-bottom: 15px;
    filter: brightness(0) invert(1) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
    /* Force White Icon */
}

.skill-content h4 {
    color: #fff;
    font-size: 1rem;
    margin: 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 900px) {
    .skills-5-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .skills-5-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- WORKS GALLERY --- */
.works-filter {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 40px 0;
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
}

.filter-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-body);
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--accent-gold);
    color: #000;
    border-color: var(--accent-gold);
}

.works-grid {
    column-count: 3;
    column-gap: 20px;
    padding: 20px 0;
}

.grid-item {
    break-inside: avoid;
    margin-bottom: 20px;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.grid-item img {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
}

.grid-item:hover img {
    transform: scale(1.03);
}

/* Play Icon Overlay for Videos */
.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: #000;
    background: var(--accent-gold);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* LIGHTBOX */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 4rem;
    color: #fff;
    cursor: pointer;
    z-index: 10001;
}

@media (max-width: 900px) {
    .works-grid {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .works-grid {
        column-count: 1;
    }
}

/* =========================================
   RESPONSIVE LAYOUT UPDATES (About & Contact)
   ========================================= */

/* --- ABOUT PAGE LAYOUT --- */
.about-intro-flex {
    grid-column: span 4;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 50px;
    align-items: flex-start;
    padding: 60px;
    min-height: auto;
}

.about-img-col {
    flex: 0 0 400px;
    max-width: 100%;
}

.about-text-col {
    flex: 1;
    min-width: 300px;
}

.about-exp-grid,
.about-details-grid {
    grid-column: span 4;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* --- CONTACT PAGE LAYOUT --- */
.contact-wrapper {
    grid-column: span 4;
    display: flex;
    gap: 60px;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 40px 0;
}

.contact-info-col {
    flex: 0.8;
    min-width: 300px;
}

.contact-form-col {
    flex: 1.2;
    min-width: 300px;
}

.contact-hero-title {
    font-family: var(--font-head);
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    text-transform: uppercase;
}

/* --- MOBILE RESPONSIVENESS (Max Width 768px) --- */
@media (max-width: 768px) {

    /* Global Adjustments */
    h1 {
        font-size: 2.5rem !important;
        /* Scale down all main headers */
    }

    /* About Page Mobile */
    .about-intro-flex {
        flex-direction: column;
        padding: 30px;
        /* Reduce padding */
        gap: 30px;
    }

    .about-img-col {
        flex: 1;
        width: 100%;
        max-width: 100%;
        flex-basis: auto;
        /* Reset flex basis */
    }

    .about-text-col {
        min-width: 0;
        width: 100%;
    }

    .about-exp-grid,
    .about-details-grid {
        grid-template-columns: 1fr;
        /* Stack cards */
        gap: 20px;
    }

    /* Contact Page Mobile */
    .contact-wrapper {
        flex-direction: column;
        gap: 40px;
        padding: 20px 0;
    }

    .contact-info-col,
    .contact-form-col {
        flex: 1;
        width: 100%;
        min-width: 0;
        /* Allow shrinking */
    }

    .contact-hero-title {
        font-size: 2.5rem;
    }

    .contact-form-container {
        padding: 20px !important;
        /* Reduce form padding */
    }
}

/* Small Mobile (Max Width 480px) */
@media (max-width: 480px) {

    .card-hero h1,
    .contact-hero-title {
        font-size: 2rem !important;
    }

    .logo img {
        height: 60px;
        /* Smaller logo */
    }
}