/*
 * JM Visuals LLC Website Styles
 * Dark mode aesthetic with golden accents inspired by the existing branding.
 * This stylesheet defines layout, typography, responsive behavior,
 * and component styling for the real estate photography website.
 */

/* Smooth scrolling for all in-page links */
html {
  scroll-behavior: smooth;
}

/* CSS Variables for easy theme customization */
:root {
    --bg-color: #0f0f0f;
    --primary-color: #caa76b;
    --text-color: #f5f5f5;
    --secondary-text-color: #b5b5b5;
    --card-bg: #1a1a1a;
    --border-radius: 8px;
    --transition-speed: 0.3s;
}

/* Reset & Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Be Vietnam Pro', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

h1, h2, h3 {
    font-weight: 600;
    color: var(--text-color);
}

h2 {
    margin-bottom: 1rem;
    font-size: 2rem;
    text-align: center;
}

/* Header */
/*
 * Header layout
 *
 * The header uses a three‑column CSS grid to keep the logo on the left,
 * the primary navigation centered in the middle, and the call‑to‑action
 * buttons aligned to the right. This ensures a balanced appearance on
 * desktop while still allowing the hamburger menu to override the layout
 * on smaller viewports. The header also has increased padding to give
 * it more breathing room and visual weight, as requested.
 */
header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 2rem 2.5rem;
    background-color: var(--bg-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    gap: 2rem;
}

header .nav-menu {
    /* Center the navigation across the entire header by positioning it absolutely */
    display: flex;
    justify-content: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

header .nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    /* Push the action buttons to the far right */
    margin-left: auto;
}

/* Buttons */
.btn-secondary {
    display: inline-block;
    padding: 0.55rem 1.2rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    transition: background-color var(--transition-speed), color var(--transition-speed);
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
}

.btn-primary {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--bg-color);
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: background-color var(--transition-speed), transform var(--transition-speed);
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn-primary:hover {
    background-color: #b89357;
    transform: translateY(-2px);
}

.header-cta {
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* --- Responsive Nav Actions for Desktop/Mobile --- */
.nav-actions-desktop { 
  display: flex; 
  margin-left: auto; 
  gap: 0.75rem; 
  align-items: center;
}
.nav-actions-mobile  { 
  display: none; 
}

/* Mobile: show actions in menu, hide on header right */
@media (max-width: 900px) {
  .nav-actions-desktop { display: none; }
  .nav-actions-mobile  { 
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    margin-top: 2rem;
    width: 100%;
  }
  .nav-actions-mobile .btn-primary,
  .nav-actions-mobile .btn-secondary {
    width: 90%;
    max-width: 320px;
    text-align: center;
    padding: 1rem 0;
    font-size: 1.1rem;
  }
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
}

.logo img {
    height: 40px;
    width: auto;
    transition: transform var(--transition-speed);
}

/* Scale the logo more noticeably on hover to draw subtle attention */
.logo img:hover {
    transform: scale(1.15);
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-menu ul li a {
    color: var(--secondary-text-color);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: color var(--transition-speed);
    position: relative;
}

/* Underline indicator for nav links */
.nav-menu ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-speed);
}

.nav-menu ul li a:hover::after {
    width: 100%;
}

.nav-menu ul li a.active::after {
    width: 100%;
}

.nav-menu ul li a:hover {
    color: var(--primary-color);
}

/* Hamburger menu for small screens */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 18px;
    cursor: pointer;
    gap: 4px;
}

.hamburger .bar {
  width: 24px;
  height: 2px;
  background: var(--primary-color);
  transition: transform var(--transition-speed) ease,
              opacity   var(--transition-speed) ease;
  transform-origin: center center;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    text-align: center;
    padding: 0 2rem;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    filter: brightness(30%);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #222222 0%, #0f0f0f 100%);
    z-index: -2;
}

.hero-content {
    max-width: 800px;
    padding-top: 6rem;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--secondary-text-color);
}

/* Services Section */
.services {
    padding: 5rem 2rem 3rem;
    background-color: var(--bg-color);
    text-align: center;
}

.services .service-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    width: 280px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: transform var(--transition-speed);
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card i {
    /* Hide the icons when images are used for service cards */
    display: none;
}

/* Image at the top of each service card */
.service-card .service-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.service-card p {
    font-size: 0.95rem;
    color: var(--secondary-text-color);
}

/* Projects Section */

.projects {
    padding: 5rem 2rem;
    background-color: #141414;
    text-align: center;
    overflow: hidden;
}


.projects .section-subtitle {
    color: var(--secondary-text-color);
    margin-bottom: 2rem;
}


.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: 80%;
    max-width: 1400px;
    margin: 0 auto;
}


.project-item {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform var(--transition-speed);
    display: flex;
    flex-direction: column;
    text-align: left;
}

.project-item:hover {
    transform: translateY(-5px);
}

.project-image {
    position: relative;
    width: 100%;
    height: 180px;
    background: radial-gradient(circle at center, #2a2a2a 0%, #141414 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-text-color);
    font-weight: 600;
    font-size: 1rem;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

.project-item h3 {
    padding: 1rem;
    color: var(--text-color);
    font-size: 1.1rem;
}

/* Gallery modal overlay */
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.85);
    backdrop-filter: blur(6px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 2rem;
}

.gallery-modal.active {
    display: flex;
}

.gallery-content {
  position: relative;
  width: 80vw;
  max-width: 1000px;
  aspect-ratio: var(--image-aspect-ratio, 16/9);  /* default fallback */
  max-height: 90vh;       /* optional cap if you still want a max */
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.gallery-display {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    flex: 1;
}

.gallery-display img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.gallery-display img.active {
    display: block;
}

.gallery-close,
.gallery-prev,
.gallery-next {
    position: absolute;
    background: rgba(0,0,0,0.5);
    border: none;
    color: var(--text-color);
    font-size: 1.8rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    z-index: 1;
    transition: background-color var(--transition-speed);
}

.gallery-close:hover,
.gallery-prev:hover,
.gallery-next:hover {
    background: rgba(0,0,0,0.7);
}

.gallery-close {
    top: 22px;
    right: 30px;
}

.gallery-prev {
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
}

.gallery-next {
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
}
/* Gallery: show images in their own aspect ratio */
.gallery-display {
  position: relative; /* ensure absolute children are positioned inside */
}

.gallery-display img {
  /* keep them hidden by default */
  display: none;

  /* center & size within the container */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  /* respect the image’s own proportions */
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;

  /* ensure the whole image shows, letterboxed if needed */
  object-fit: contain;
}

.gallery-display img.active {
  display: block;
}

/* Reviews Section */
.reviews {
    padding: 5rem 2rem;
    background-color: #141414;
    text-align: center;
}

.reviews-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.review-card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    width: 280px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform var(--transition-speed);
}

.review-card:hover {
    transform: translateY(-5px);
}

.review-card .stars {
    margin-bottom: 0.5rem;
}

.review-card .stars i {
    color: var(--primary-color);
    margin-right: 0.1rem;
}

.review-card p {
    font-size: 0.9rem;
    color: var(--secondary-text-color);
    margin-bottom: 0.75rem;
}

.review-card h4 {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Clients Section */
.clients {
    padding: 5rem 2rem;
    background-color: var(--bg-color);
    text-align: center;
    overflow: hidden;
}

.logo-container {
    overflow: hidden;
    position: relative;
    width: 100%;
    margin-top: 2rem;
}

.logo-track {
    display: flex;
    gap: 2rem;
    animation: scroll-logos 10s linear infinite;
}

.client-logo {
    min-width: 160px;
    height: 100px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1rem;
}

@keyframes scroll-logos {
    0% {
        transform: translateX(0);
    }
    100% {
        /* Move by one quarter of the total width since there are four duplicate sets */
        transform: translateX(-25%);
    }
}

/* Statistics Section */
.statistics {
    padding: 5rem 2rem;
    background-color: #141414;
    text-align: center;
}

.stats-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
  background-color: var(--card-bg);
  padding: 2rem;
  border-radius: var(--border-radius);
  width: 200px;
  transition: transform var(--transition-speed);
  position: relative;
  box-shadow: none;
  overflow: hidden;
}

/* Simulated gold top border */
.stat-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: 100%;
  background-color: var(--primary-color);
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-item h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: var(--secondary-text-color);
    font-size: 0.9rem;
}

/* About Section */
.about {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 5rem 2rem;
    gap: 3rem;
    background-color: var(--bg-color);
}

.about-content {
    /* Allow the content to center itself within the section and
       constrain its width for readability. The flex basis is set
       to 100% so the text naturally centers under the heading
       on larger screens. */
    flex: 1 1 100%;
    text-align: center;
    margin: 0 auto;
    max-width: 600px;
}

.about-content p {
    color: var(--secondary-text-color);
    margin-top: 1rem;
    max-width: 600px;
    line-height: 1.6;
}

.about-image {
    flex: 1 1 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-image .placeholder {
    width: 100%;
    height: 250px;
    background: radial-gradient(circle at center, #2a2a2a 0%, #141414 100%);
    color: var(--secondary-text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
}

/* Contact Section */
.contact {
    padding: 5rem 2rem;
    background-color: #141414;
    text-align: center;
}

.contact p {
    color: var(--secondary-text-color);
    margin-bottom: 2rem;
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    justify-content: center;
    max-width: 1100px;
    margin: 0 auto;
}

.contact-form {
    flex: 1 1 350px;
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.contact-form .form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    border: none;
    background-color: #262626;
    color: var(--text-color);
    font-size: 0.9rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: 2px solid var(--primary-color);
}

.contact-form button {
    margin-top: 1rem;
    border: none;
    cursor: pointer;
}

.contact-info {
    flex: 1 1 250px;
    text-align: left;
    color: var(--secondary-text-color);
}

.contact-info h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.contact-info p {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-info i {
    color: var(--primary-color);
}

.social-links {
    margin-top: 1rem;
}

.social-links a {
    margin-right: 0.8rem;
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: color var(--transition-speed);
}

.social-links a:hover {
    color: #b89357;
}

/* Footer */
footer {
    background-color: #0d0d0d;
    padding: 2rem;
    text-align: center;
}

/*
 * Service Area Section
 *
 * This section highlights the geographic area JM Visuals serves. The paragraph
 * beneath the heading is centered and constrained in width for improved
 * readability. A responsive grid of images showcases the region in an
 * offset layout.
 */
.service-area {
    padding: 5rem 2rem;
    /* Use a subtle gradient to give the service area more visual interest */
    background: linear-gradient(135deg, #141414 0%, #0d0d0d 100%);
    text-align: center;
}

.service-area h2 {
    margin-bottom: 1rem;
}

.service-area p {
    color: var(--secondary-text-color);
    margin: 0 auto 2rem;
    max-width: 800px;
    line-height: 1.6;
}

.area-images {
    display: grid;
    /* Create an offset mosaic layout for the service area. Each
       auto-fit column will have a minimum width of 150px. The
       grid uses fixed row heights so some images can span multiple
       rows or columns for a dynamic composition. */
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    grid-auto-rows: 150px;
    gap: 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

.area-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Increase the size of specific service area images to create a more
   engaging mosaic. The first image spans two rows, the second spans
   two columns, and the third spans both two rows and two columns. */
.area-images img:nth-child(1) {
    grid-row: span 2;
}

.area-images img:nth-child(2) {
    grid-column: span 2;
}

.area-images img:nth-child(3) {
    grid-row: span 2;
    grid-column: span 2;
}

/*
 * FAQ Section
 *
 * The frequently asked questions are presented as accordion items. Each
 * question button toggles the visibility of the associated answer. Icons
 * rotate to indicate open/closed state. Answers are hidden by default.
 */
.faq {
    padding: 5rem 2rem;
    background-color: var(--bg-color);
    text-align: center;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.faq-item {
    margin-bottom: 1rem;
    border: 1px solid #333;
    border-radius: var(--border-radius);
    overflow: hidden;
    background-color: var(--card-bg);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.faq-icon {
    margin-left: 1rem;
    transition: transform var(--transition-speed);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: var(--bg-color);
    padding: 0 1rem;
}

.faq-item.active .faq-answer {
    max-height: 200px;
    padding: 1rem;
}

.faq-answer p {
    color: var(--secondary-text-color);
    font-size: 0.9rem;
}

/*
 * App download popup
 *
 * A modal that appears a few seconds after page load, encouraging
 * visitors to download the JM Visuals app. The overlay darkens the
 * background. The modal itself is centered and hidden by default.
 */
.app-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}

.app-popup.hidden {
    display: none;
}

.app-popup-content {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
}

.app-popup-content h3 {
    margin-bottom: 0.5rem;
}

.app-popup-content p {
    color: var(--secondary-text-color);
    margin-bottom: 1rem;
}

.app-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.app-popup-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--secondary-text-color);
    cursor: pointer;
}
/* make the popup image perfectly square and centered */
.popup-image {
  display: block;
  margin: 0 auto 1rem;       /* center and give space below */
  width: 100%;                /* fill the popup’s width */
  max-width: 300px;           /* but cap it if you like */
  aspect-ratio: 1 / 1;        /* force a square */
  object-fit: cover;          /* crop rather than stretch */
  border-radius: var(--border-radius);
}
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-content p {
    color: var(--secondary-text-color);
    font-size: 0.8rem;
}

.footer-nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-nav a {
    font-size: 0.8rem;
    color: var(--secondary-text-color);
    transition: color var(--transition-speed);
}

.footer-nav a:hover {
    color: var(--primary-color);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .nav-menu ul {
        flex-direction: column;
        gap: 1rem;
    }
    .hamburger {
        display: flex;
	margin-left: auto;
    }
    .services .service-cards {
        flex-direction: column;
        align-items: center;
    }
    .about {
        flex-direction: column;
    }
    .about-image .placeholder {
        height: 200px;
    }

    header .nav-menu {
    position: fixed;
    top: 60px;
    right: 0;
    left: 0;
    bottom: 0;
    width: 100vw;
    max-width: none;
    background-color: var(--bg-color);
    transform: translateX(100%);
    transition: transform var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
    padding-top: 1rem;
    z-index: 998;
}
header .nav-menu.active {
    transform: translateX(0);
}
header .nav-menu ul {
    flex-direction: column;
    gap: 1rem;
}
.hamburger.active .bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

/* Middle bar → fade out */
.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}

/* Bottom bar ↗ rotate −45° */
.hamburger.active .bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}
	@keyframes scroll-logos-mobile {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-100%);
  }

  /* 2) Tell .logo-track to use that animation at your faster speed */
  .logo-track {
    /* override the desktop “scroll-logos” 45s animation */
    animation: scroll-logos-mobile 20s linear infinite;
  }
	.gallery-content {
    width: 100vw;           /* full screen width */
    max-width: 100%;        /* drop the desktop cap */
    height: auto;           /* let height flow from aspect-ratio */
    aspect-ratio: 16 / 9;   /* landscape 16:9 */
    max-height: none;       /* remove the 70vh / 700px limit */
  }

  /* 2) Let the images fill that frame without stretching */
  .gallery-display {
    height: 100%;           /* match the new container height */
  }
  .gallery-display img {
    width: 100%;            /* full width of the frame */
    height: 100%;           /* full height of the frame */
    object-fit: cover;      /* crop to fill, preserving landscape */
  
}
}
}

/*
 * Gallery hero
 *
 * A full‑width hero for the gallery page using a background image.
 */
.gallery-hero {
    position: relative;
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    background-image: url('images/gallery/gallery-92.jpg');
    background-size: cover;
    background-position: center center;
}

/*
 * Gallery grid
 *
 * Adjust the size of images within the gallery so they appear uniform and not
 * overly large. The grid automatically fits as many columns as will fit
 * based on a minimum width of 200px.
 */
.gallery-container .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 1rem;
    max-width: none;
    width: 80%;
    margin: 0 auto;
    margin-top: 2rem;
    padding: 0 1rem;
}

.gallery-container .gallery-grid img {
    width: 100%;
    /* Reduce the fixed height of gallery images so they don't appear
       overwhelmingly large on the gallery page. A height of 150px
       maintains a neat grid while keeping images visible. */
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/*
 * Blog hero
 *
 * A hero section for the blog page with a background image and overlay.
 */
.blog-hero {
    position: relative;
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    background-image: url('images/blog-hero.png');
    background-size: cover;
    background-position: center;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

.blog-hero h1 {
    position: relative;
    z-index: 1;
    color: var(--text-color);
    font-size: 2.5rem;
}

.gallery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

.gallery-hero h1 {
    position: relative;
    z-index: 1;
    color: var(--text-color);
    font-size: 2.5rem;
}

/*
 * Blog Layout
 *
 * The blog page consists of a featured post followed by a list of
 * additional posts. Each piece of content has its own card with
 * imagery and text. The grid layout adapts to available space.
 */
.blog-container {
    padding: 5rem 2rem;
    background-color: var(--bg-color);
    max-width: 1100px;
    margin: 0 auto;
}

.featured-post {
    display: flex;
    flex-wrap: wrap;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    margin-bottom: 2rem;
}

.featured-post img {
    flex: 1 1 300px;
    width: 100%;
    max-height: 250px;
    object-fit: cover;
}

.featured-post-content {
    flex: 1 1 300px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-post-content h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.featured-post-content p {
    color: var(--secondary-text-color);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.blog-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.blog-post {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: transform var(--transition-speed);
}

.blog-post:hover {
    transform: translateY(-5px);
}

.blog-post img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.blog-post h3 {
    padding: 1rem;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.blog-post p {
    padding: 0 1rem 1rem;
    color: var(--secondary-text-color);
    font-size: 0.9rem;
    line-height: 1.5;
}
.clients {
    padding-bottom: 2rem !important; /* Reduce space below */
}
@media (max-width: 768px) {
  body.nav-open .elfsight-app-1ca800d1-dd32-4f65-bd8f-921867d2f82d {
  }
}
/* Base widget style (visible) */
.elfsight-app-1ca800d1-dd32-4f65-bd8f-921867d2f82d {
  transition: opacity 0.3s ease, visibility 0.3s ease;
  opacity: 1;
  visibility: visible;
}

/* Hide widget when nav is open on mobile */
@media (max-width: 768px) {
  body.nav-open .elfsight-app-1ca800d1-dd32-4f65-bd8f-921867d2f82d {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}
@media (max-width: 768px) {
  .nav-menu ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 2rem 0;
  }

  .nav-menu ul li a {
    font-size: 2rem;
    text-align: center;
  }
}
@media (max-width: 768px) {
  body.nav-open .elfsight-app-aae9d824-16ff-4f30-9c2a-4b1f9acefb0a {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .elfsight-app-aae9d824-16ff-4f30-9c2a-4b1f9acefb0a {
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
}
/* Smooth hide for chatbot on mobile when nav is open */
.elfsight-app-aae9d824-16ff-4f30-9c2a-4b1f9acefb0a {
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

@media (max-width: 768px) {
  body.nav-open .elfsight-app-aae9d824-16ff-4f30-9c2a-4b1f9acefb0a {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}
.blog-container {
    padding-top: 8rem; /* adjust as needed to match header height */
}
@media (max-width: 768px) {
  /* make the whole contact-info span full width and center its headings/text */
  .contact-info {
    flex: 1 1 100%;
    text-align: center;
  }

  /* because each <p> is a flex-row (icon + text), center its items */
  .contact-info p {
    justify-content: center;
  }
}
.contact-info a {
  color: inherit;           /* match the other contact text */
  text-decoration: none;    /* remove underline */
  transition: color 0.3s;
}
.contact-info a:hover {
  color: var(--primary-color); /* highlight on hover */
  text-decoration: underline;   /* optional */
}
/* 1) Make the body exactly the height of the viewport */
html, body {
  height: 100%;
}
body {
  display: flex;
  flex-direction: column;
  /* force the flex‐container to match the viewport */
  min-height: 100vh;
  margin: 0; /* you already have this, but safe to be explicit */
}

/* 2) Pin the footer to the bottom */
footer {
  margin-top: auto;   /* still “soaks up” all available space */
  flex-shrink: 0;     /* never collapse smaller than its content */
}
/* Hide the app-download popup on desktop */
@media (min-width: 769px) {
  #app-popup {
    display: none !important;
  }
}
/* ensure anchored targets clear the fixed header */
:root {
  --header-offset: 100px; /* set this to your real header height */
}

/* apply to every element with an id (sections, headings, etc.) */
[id] {
  scroll-margin-top: var(--header-offset);
}
/* Make Elfsight contact form widget wider */
.elfsight-app-f3f27a05-8bc9-49f9-ae2b-3abc2d36b5a4 {
  width: 100% !important;
  max-width: 650px;  /* Or 100% for edge-to-edge */
  margin: 0 auto !important;
  box-sizing: border-box;
  min-width: 320px;
}
/* --- MOBILE GALLERY GRID FIX --- */
@media (max-width: 768px) {
  .gallery-container .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    width: 100%;
    padding: 1rem 0.5rem;
    margin: 0 auto;
    gap: 0.5rem;
  }
  .gallery-container .gallery-grid img {
    height: 160px;
    object-fit: cover;
    border-radius: var(--border-radius);
    /* Optional: Uncomment next line if you want perfect squares */
    /* aspect-ratio: 1/1; */
  }
}
@media (max-width: 768px) {
  .gallery-close,
  .gallery-prev,
  .gallery-next {
    display: none !important;
  }
}
/* Prevent scrolling on the background when modal is open */
.body-modal-open {
  overflow: hidden;
  touch-action: none;  /* For extra safety, disables gestures */
  overscroll-behavior: contain;
  position: fixed;
  width: 100vw;
}
@media (max-width: 768px) {
  .nav-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    margin-top: 2rem;
    width: 100%;
  }
  .nav-actions .btn-primary,
  .nav-actions .btn-secondary {
    width: 90%;
    max-width: 320px;
    text-align: center;
    padding: 1rem 0;
    font-size: 1.1rem;
  }
}