/* ==========================================================================
   1. GLOBAL STYLES
   ========================================================================== */

:root {
    /* Color Palette */
    --primary: #22f7ff;
    --secondary: #5b12ff;
    --background: #c3f7f9;
    --text-color: #ffffff;
    --muted: #70685f;
    --bg-color: #1a1a1a;
    --success-color: #28a745;
    --link-hover: #f00000;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
}

* {
    box-sizing: border-box;
    /* margin: 0; */
    padding: 0;
}

html {
    scroll-behavior: smooth;
    /* Change 80px to match the exact height of your sticky header */
    /* scroll-padding-top: 90px;  */
}

body {
    font-family: "Inter", system-ui, sans-serif;
    background-color: var(--background);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
}

/* ==========================================================================
   2. STICKY HEADER
   ========================================================================== */

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    /* background-color: #1a1a1a; */
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.brand img {
    height: 40px;
    max-width: 100%;
    margin-right: 1rem;
}

.nav-links {
    display: flex;
    gap: 25px;
    list-style: none;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
}

.hamburger-svg .line {
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

/* Hamburg-X Keyframe Triggers */
.menu-toggle.active .top-line { transform: translateY(30px) rotate(45deg); }
.menu-toggle.active .mid-line { opacity: 0; }
.menu-toggle.active .bot-line { transform: translateY(-30px) rotate(-45deg); }

/* ==========================================================================
   3. HERO SLIDESHOW SECTION
   ========================================================================== */

/* .img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img {
    display:block;
    width:100% \9;
    max-width:100%;
    height:auto
} */
.hero-section {
    position: relative;
    width: 100%;
    height: 81vh;
    overflow: hidden;
}

.hero-section::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0.3), rgba(0,0,0,0.6));
    z-index: 5;
    pointer-events: none;
}

.slides-track {
    /* display: flex;
    width: 1000%;
    height: 100%; 
    animation: slideShow 16s infinite cubic-bezier(0.77, 0, 0.175, 1);*/
    position: relative;
    width: 100%;
    height: 100%;
    /* height: 70vh; */ /* Mobile height */
    overflow: hidden;
    background-color: #000;
    
}

/* Apply the animation to the picture wrapper */
.slide_gallery {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    animation: fadeShowGallery 40s infinite ease-in-out;
}

/* This targets the actual img tag inside the picture element */
.slide_gallery img {
    width: 100%;
    height: 100%;
    /* Acts exactly like background-size: cover for HTML images */
    object-fit: cover; 
    object-position: center;
}

.slides-track:hover .slide_gallery {
    animation-play-state: paused;
}

/* --- Keep your animation delays exactly the same --- */
.slide_gallery:nth-child(1)  { animation-delay: 0s; }
.slide_gallery:nth-child(2)  { animation-delay: 4s; }
.slide_gallery:nth-child(3)  { animation-delay: 8s; }
.slide_gallery:nth-child(4)  { animation-delay: 12s; }
.slide_gallery:nth-child(5)  { animation-delay: 16s; }
.slide_gallery:nth-child(6)  { animation-delay: 20s; }
.slide_gallery:nth-child(7)  { animation-delay: 24s; }
.slide_gallery:nth-child(8)  { animation-delay: 28s; }
.slide_gallery:nth-child(9)  { animation-delay: 32s; }
.slide_gallery:nth-child(10) { animation-delay: 36s; }

@keyframes fadeShowGallery {
    0% { opacity: 0; }
    2.5%, 7.5% { opacity: 1; }
    10%, 100% { opacity: 0; }
}

/* .slides-track:hover {
    animation-play-state: paused;
} */

.slide {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 10;
    width: 90%;
    max-width: 800px;
    /* display: flex;
    gap: 1rem;
    flex-wrap: wrap; */
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 15px;
    text-shadow: 0 4px 12px rgba(0,0,0,0.6);
}

.hero-content p {
    font-size: 18px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
    margin: 0;
}

.hero-action {
    display: flex;
    gap: 1rem;
    justify-content: center; /* Centers horizontally */
    margin-top: 20px;
}

/* 
@keyframes slideShow {
    0%, 9%    { transform: translateX(0%); }
    10%, 19%  { transform: translateX(-10%); }
    20%, 29%  { transform: translateX(-20%); }
    30%, 39%  { transform: translateX(-30%); }
    40%, 49%  { transform: translateX(-40%); }
    50%, 59%  { transform: translateX(-50%); }
    60%, 69%  { transform: translateX(-60%); }
    70%, 79%  { transform: translateX(-70%); }
    80%, 89%  { transform: translateX(-80%); }
    90%, 100% { transform: translateX(-90%); }
} */



.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.95rem 1.7rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.3s ease, color 0.3s ease;

  /* Add box-shadow to base state so it can animate smoothly */
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  
  /* 2. Transition rule including transform and box-shadow */
    transition: 
        background-color 0.3s ease, 
        transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), 
        box-shadow 0.3s ease;
}

.button.primary {
    background: #3498db;
    color: white;
}

.button.primary:hover {
    background-color: var(--primary);
    color: #333;
    /* Scale up by 5% */
    transform: scale(1.05);
    
    /* Soft, colored glow effect */
    box-shadow: 0 8px 20px rgba(46, 138, 204, 0.4);
}

.button.secondary {
    background: var(--secondary);
    color: white; 
}

.button.secondary:hover {
    background-color: var(--primary);
    color: #333;
    /* Scale up by 5% */
    transform: scale(1.05);
    
    /* Soft, colored glow effect */
    box-shadow: 0 8px 20px rgba(46, 138, 204, 0.4);
}

/* ==========================================================================
   4. PORTFOLIO SECTION (CSS GRID)
   ========================================================================== */

main {
    display: flex;
    flex-direction: column;
}

section {
    max-width: 1500px;
    margin: 30px auto;
    padding: 0 20px;
    /* display: flex;
    flex-direction: column; */
}

/* .portfolio-section h2 {
    font-size: 32px;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    color: var(--bg-color);
} */

.portfolio-section h3 {
    color: var(--primary);
    transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.portfolio-section h3:hover {
    color: var(--secondary);
}

/* CSS Grid layout engine configurations */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 equal columns on desktop */
    gap: 25px;                            /* Clean masonry gutters */
}

.portfolio-header {
    place-items: center;
    grid-column: 1 / -1; /* Spans all 4 columns */
    grid-row: 1;         /* FORCES header onto the very first row */
    text-align: center;
    width: 100%;  
    /* display: grid;
    place-items: center; */
    /*grid-column: 1 / -1; /* Span the entire width of the grid */
    /* text-align: center; */
    /* margin-bottom: 20px; */
}

.portfolio-grid span{
    text-align: center;
    font-size: 1.2rem;
    text-align: center;    
    color: var(--secondary);;
    margin: 0 0 2rem 0;
    
}

.portfolio-grid h2 {
    font-size: 32px;
    text-align: center;    
    color: var(--bg-color);;
    margin: 0 0 2rem 0;  
    /*
    grid-column: 1 / -1; /* Span the entire width of the grid */
    /* font-size: 32px;
    text-align: center;    
    color: var(--bg-color); */
}

.portfolio-item {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    grid-column: span 2;
}

/* Grid design item spanning utility */
.portfolio-item.featured {
    grid-column: span 4; /* Featured class takes up four slots */
}

/* 📦 1. Parent Card Container Wrapper Mod */
.card-image-wrapper {
    height: 240px;
    overflow: hidden; ✂️ Crucial: Clips the expanding image inside the card boundaries
    position: relative;
}

/* 🖼️ 2. The Baseline Art Image State */
.card-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* 🚀 3. Scale Shift Trigger on Mouse Hover */
.card-image:hover {
    transform: scale(1.08); /* Scales image smoothly outward by 8% */
}

.card-info {
    padding: 20px;
}

.card-info h3 {
    margin-bottom: 10px;
    font-size: 20px;
}

.card-info p {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* ==========================================================================
   5. REVIEWS SECTION (CSS GRID)
   ========================================================================== */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.reviews-header, .contact-heading, .about-heading, .galleria-heading {
    place-items: center;
    grid-column: 1 / -1; /* Spans all 4 columns */
    grid-row: 1;         /* FORCES header onto the very first row */
    text-align: center;
    width: 100%; 
}

.reviews-header h2, .contact-heading h2, .about-heading h2, .galleria-heading h2 {
    text-align: center;
    font-size: 2rem;
    text-align: center;    
    color: var(--bg-color);;
    margin: 0 0 2rem 0;
}

.reviews-header h3, .contact-heading h3 {
    text-align: center;
    color: var(--muted);    
}

.reviews-header span, .contact-heading span, .about-heading span, .galleria-heading span {
    text-align: center;
    font-size: 1.2rem;       
    color: var(--secondary);;
    margin: 0 0 2rem 0;
}

.review-card {
  background-color: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--muted);
}

.review-stars {
  font-size: 1.1rem;
  color: #f7b955;
}

.review-action {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.reviews-embed {
  margin-top: 2rem;
  border-radius: 1.6rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.reviews-embed iframe {
  width: 100%;
  min-height: 360px;
  border: 0;
}

/* ==========================================================================
   5. CONTACT SECTION (CSS GRID)
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

/* .contact-heading span {
    /* place-items: center; */
    /* text-align: center; */
    /* grid-column: 1 / -1; 
    grid-row: 1;          
} */
.contact-info p {
    place-items: center;
    grid-column: 1 / -1; /* Spans all 4 columns */
    grid-row: 1;         /* FORCES header onto the very first row */
    text-align: center;
    width: 100%; 
    color: var(--muted);
}



.contact-form {
  display: grid;
  gap: 1rem;
  background: var(--muted);
  padding: 2rem;
  border-radius: 1.6rem;
  box-shadow: var(--shadow);
}

.contact-form label {
  display: grid;
  gap: 0.6rem;
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 1rem;
  font: inherit;
  color: var(--muted);
  background: #fff;
}

/* ==========================================================================
   6. GALLERIA SECTION (CSS GRID)
   ========================================================================== */
.galleria-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.slide-galleria {
    /* position: absolute;
    top: 0;
    left: 0;
    width: 100%; 
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat; */
    
    /* Start everything invisible */
    /* opacity: 0;  */
    
    /* 10 images * 4 seconds per image = 40s total loop duration */
    /* animation: fadeShowGallery 40s infinite ease-in-out; */
}

.galleria-slideshow {
    position: relative;
    width: 1200px;
    height: 80vh;    
    overflow: hidden;
    background-color: #000;
    
}

/* Apply the animation to the picture wrapper */
.slide_galleria {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    animation: fadeShowGallery 40s infinite ease-in-out;
}

/* This targets the actual img tag inside the picture element */
.slide_galleria img {
    width: 100%;
    height: 100%;
    /* Acts exactly like background-size: cover for HTML images */
    object-fit: cover; 
    object-position: center;
}

.galleria-slideshow:hover .slide_galleria {
    animation-play-state: paused;
}

/* --- Keep your animation delays exactly the same --- */
.slide_galleria:nth-child(1)  { animation-delay: 0s; }
.slide_galleria:nth-child(2)  { animation-delay: 4s; }
.slide_galleria:nth-child(3)  { animation-delay: 8s; }
.slide_galleria:nth-child(4)  { animation-delay: 12s; }
.slide_galleria:nth-child(5)  { animation-delay: 16s; }
.slide_galleria:nth-child(6)  { animation-delay: 20s; }
.slide_galleria:nth-child(7)  { animation-delay: 24s; }
.slide_galleria:nth-child(8)  { animation-delay: 28s; }
.slide_galleria:nth-child(9)  { animation-delay: 32s; }
.slide_galleria:nth-child(10) { animation-delay: 36s; }

   


/* ==========================================================================
   6. GALLERY SECTION (CSS GRID)
   ========================================================================== */
.gallery-section {
    position: relative;
    width: 100%;
    /* FIX: Reduces the height on mobile so it fits beautifully on phone screens */
    height: 90vh; 
    /* height: 90vh; Responsive height */
    overflow: hidden;
    background-color: #000; /* Prevents white flashes during transitions */
}

.gallery {
    position: relative; /* Stacks children correctly */
    width: 100%;
    height: 90vh;
    /* height: 90vh; /* Responsive height */
    overflow: hidden;
    background-color: #000; /* Prevents white flashes during transitions */
}

.slide_gallery {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; 
    /* min-width: 100%; works*/
    /*height: auto;  Maintains aspect ratio */
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    /* Start everything invisible */
    opacity: 0; 
    
    /* 10 images * 4 seconds per image = 40s total loop duration */
    animation: fadeShowGallery 40s infinite ease-in-out;
}

/* Pause the fading effect on hover */
.gallery:hover .slide_gallery {
    animation-play-state: paused;
}

/* 
   STAGGERED DELAYS FOR 10 IMAGES
   Formula: (Total Duration / Number of Slides) * (Slide Index - 1)
   40s / 10 = 4s delay steps
*/
.slide_gallery:nth-child(1)  { animation-delay: 0s; }
.slide_gallery:nth-child(2)  { animation-delay: 4s; }
.slide_gallery:nth-child(3)  { animation-delay: 8s; }
.slide_gallery:nth-child(4)  { animation-delay: 12s; }
.slide_gallery:nth-child(5)  { animation-delay: 16s; }
.slide_gallery:nth-child(6)  { animation-delay: 20s; }
.slide_gallery:nth-child(7)  { animation-delay: 24s; }
.slide_gallery:nth-child(8)  { animation-delay: 28s; }
.slide_gallery:nth-child(9)  { animation-delay: 32s; }
.slide_gallery:nth-child(10) { animation-delay: 36s; }

/* 
   ANIMATION TIMING (For 10 images)
   Each image gets 10% of the total time (4s).
   It spends ~2.5% fading in, ~5% fully visible, and ~2.5% fading out.
*/
@keyframes fadeShowGallery {
    0% {
        opacity: 0;
    }
    2.5%, 7.5% {
        opacity: 1; /* Fully visible */
    }
    10%, 100% {
        opacity: 0; /* Hidden for the rest of the loop */
    }
}

.about-heading p {
    place-items: center;
    grid-column: 1 / -1; /* Spans all 4 columns */
    grid-row: 1;         /* FORCES header onto the very first row */
    text-align: center;
    width: 100%; 
    color: var(--muted);
    margin: 0 auto 2rem auto;
    max-width: 1200px; /* Optional: Limit width for better readability */
}

/* ==========================================================================
   8. FOOTER STYLES
   ========================================================================== */

footer {
    display: flex;
    justify-content: center;
}

footer.site-footer {
    /* background-color: #1a1a1a; */
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer p {
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-logo {
    font-weight: bold;
    margin-right: 10px;
    color: var(--text-color);
}

/* ==========================================================================
   5. RESPONSIVE MOBILE ARCHITECTURE
   ========================================================================== */

@media (max-width: 768px) {
  /* Navbar Overrides */
  .menu-toggle { display: block; }
  .navbar { flex-wrap: wrap; }
  
  .nav-links {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    margin-top: 0;
    gap: 15px;
    text-align: center;
    transition: max-height 0.4s ease-in-out, margin-top 0.4s ease-in-out;
  }

  .nav-links.active {
    max-height: 300px;
    margin-top: 15px;
  }

  .nav-links li {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .nav-links.active li {
    opacity: 1;
    transform: translateY(0);
  }

  .nav-links.active li:nth-child(1) { transition-delay: 0.15s; }
  .nav-links.active li:nth-child(2) { transition-delay: 0.25s; }
  .nav-links.active li:nth-child(3) { transition-delay: 0.35s; }
  .nav-links.active li:nth-child(4) { transition-delay: 0.45s; }

  
  /* Hero Reductions */
  /* .hero-section {
        height: 60vh;
        
    } */

  .slides-track {
        height: 90vh; /* Desktop height */
    }

  .hero-content h1 { font-size: 32px; }
  .hero-content p { font-size: 16px; }

  /* ⚡ Grid Transformation: Collapse columns on smaller viewports */
    .portfolio-grid {
        grid-template-columns: 1fr; /* Force 1-column stack */
        display: grid;
        gap: 0;
    }

    .portfolio-header {
        /* Stretch across the single column */
        /* grid-column: 1 / -1;  */
        /* Enforce row 1 placement */
        /* grid-row: 1;         */

        /* Flexbox safely centers text on mobile surfaces */
        /* display: flex;        */
        /* justify-content: center;
        align-items: center;
        width: 100%; */
        grid-column: 1 / -1; 
        grid-row: 1;        
        place-items: center;
    }

    .portfolio-grid span {
        font-size: 1rem;
    }

    .portfolio-grid h2 {
        font-size: 28px;
        text-align: center;
        width: 100%;
        /* margin: 10px 0;      Provides clean separation spacing */
    }

    /* Target the very first card item and push it strictly below the header */
    .portfolio-item.featured {
        grid-column: 1 / -1; /* Safely forces card to be full-width on mobile */
        grid-row: 2;         /* Forces it onto the second row below header */
    }

  /* .portfolio-grid {
    grid-template-columns: 1fr; 
    display:block;
  }

  .portfolio-header {
    display: grid;
    place-items: center;
    grid-column: span 1; 
  }

  .portfolio-grid h2 {
    font-size: 28px;
    display: grid;
    place-items: center;   
  } */

    .portfolio-item {
    margin: 20px 0;
    }

    .container {
        grid-template-columns: 1fr; /* Force 1-column stack */
        display: grid;        
        /* place-items: center; */
    }   

    /* .reviews-grid {  
        grid-column: 1 / -1; 
        grid-row: 2;        
        place-items: center;
    } */
    
    /* 1. Reset the grid layout for mobile */
    .reviews-grid {  
        display: grid;
        /* Changes layout from 3 columns down to 1 column */
        grid-template-columns: minmax(0, 1fr); 

        /* Adds standard spacing between stacked cards */
        gap: 1.5rem;

        /* Clear any row restrictions on the grid container */
        grid-column: auto;
        grid-row: auto; 
    }

    /* 2. Fix the child elements (the individual cards) */
    .reviews-grid .review-card {
        /* Force cards to flow into their own natural rows */
        grid-column: auto !important;
        grid-row: auto !important;
        position: relative; /* Safety check in case absolute positioning was used */
    }

    .reviews-header {
        grid-column: 1 / -1; 
        grid-row: 1;        
        place-items: center;
    }

    .reviews-header h2, .contact-heading h2, .about-heading h2, .galleria-heading h2 {
        font-size: 28px;    
    }

    .reviews-header span, .contact-heading span, .about-heading span, .galleria-heading span {    
        font-size: 1rem;
    }

    /* .review-card {
        grid-column: 1 / -1; 
        grid-row: 2;        
        place-items: center;
    } */

    /* .review-card {
        grid-column: 1 / -1;            
        grid-row: 1; 
        display: flex;       
        justify-content: center;
        align-items: center;
        width: 100%;       
        
    } */


  .gallery-section {
    height: auto; /* Adjust height for mobile */
    width:100%;
  } 

  .galleria-slideshow {   
    width: 400px !important; 
    height: 90vh !important;    
}
  

  footer p{
    margin: 0;
  }
}
