/* Kakatiya Constructions - brand overrides (loaded after style.css) */
:root {
    --primary: #03335e;        /* logo navy */
    --primary-dark: #02223f;
    --primary-light: #1d5a94;
    --accent: #eaa648;         /* logo orange */
    --accent-dark: #d18f2f;
    --accent-light: #f3c079;
}

/* Logo image in header and footer */
.logo-icon.logo-img,
.header.scrolled .logo-icon.logo-img {
    background: #fff;
    width: 58px;
    height: 54px;
    padding: 5px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.logo-icon.logo-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.nav-cta i, .btn i.fa-phone, .btn i.fa-comment-dots { margin-right: 8px; }

/* Client names */
.clients-grid.clients-5 { grid-template-columns: repeat(5, 1fr); }
.client-logo .brand-name { font-family: var(--font-heading); font-weight: 700; color: var(--primary); }

/* Project cards */
.project-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.project-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    display: flex;
    flex-direction: column;
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.project-plate {
    position: relative;
    height: 150px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
}
.project-plate > i { font-size: 3rem; color: var(--accent); }
.project-cat {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--accent);
    color: var(--primary-dark);
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 3px;
}
.project-body { padding: 22px; }
.project-name { font-family: var(--font-heading); font-size: 1.15rem; color: var(--primary); margin-bottom: 8px; }
.project-loc { color: var(--gray-700); font-size: 0.92rem; margin-bottom: 6px; }
.project-loc i { color: var(--accent-dark); margin-right: 6px; }
.project-note { color: var(--gray-600); font-size: 0.88rem; margin: 0; }
.project-next { background: var(--primary); border-color: var(--primary); justify-content: center; text-align: center; }
.project-next .project-name { color: #fff; }
.project-next .project-note { color: rgba(255, 255, 255, 0.8); margin-bottom: 18px; }

.project-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.project-plate { height: 170px; }
.project-cat { z-index: 2; }

/* Scope of work */
.scope-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.scope-item { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--gray-200); border-left: 3px solid var(--accent); border-radius: var(--radius-md); padding: 20px 18px; }
.scope-item > i { color: var(--primary); font-size: 1.3rem; margin-top: 3px; width: 26px; text-align: center; flex: none; }
.scope-item h4 { font-family: var(--font-heading); font-size: 0.98rem; color: var(--primary); margin-bottom: 4px; }
.scope-item p { font-size: 0.86rem; color: var(--gray-600); margin: 0; line-height: 1.5; }

/* About page logo panel */
.about-logo-panel img { width: 100%; max-width: 460px; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); display: block; margin: 0 auto; }

/* Contact quote card */
.btn-secondary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-secondary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.quote-list { margin: 20px 0 28px; }
.quote-buttons { display: flex; gap: 14px; flex-wrap: wrap; }
.footer-contact a { color: inherit; }

/* Franchise cards show the brand logo on white (a project photo, if added, covers it) */
.project-plate.has-logo { background: #fff; border-bottom: 1px solid var(--gray-200); padding: 46px 16px 12px; }
.project-logo { width: auto; height: auto; max-width: 70%; max-height: 108px; object-fit: contain; }

/* Project photo gallery: cards with a photo open a full-screen viewer */
.project-plate { overflow: hidden; }
.project-plate.has-photo { cursor: zoom-in; }
.project-plate.has-photo .project-photo { transition: transform var(--transition-slow); }
.project-plate.has-photo:hover .project-photo,
.project-plate.has-photo:focus-visible .project-photo { transform: scale(1.05); }
.project-plate.has-photo:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.project-zoom {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(2, 34, 63, 0.75);
    color: #fff;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(2, 20, 38, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 70px 80px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    /* Swipes go to the gallery, not to the browser's back gesture; pinch-zoom still works */
    touch-action: pinch-zoom;
    overscroll-behavior: contain;
}
/* Become visible immediately on open so the close button can take focus */
.lightbox.open { opacity: 1; visibility: visible; transition: opacity 0.25s ease, visibility 0s; }
.lightbox-figure { margin: 0; max-width: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox-img {
    max-width: 100%;
    max-height: calc(100vh - 170px);
    width: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: var(--shadow-xl);
}
.lightbox-caption {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    margin-top: 14px;
    color: #fff;
    font-family: var(--font-heading);
    font-size: 0.95rem;
}
.lightbox-count { color: var(--accent); white-space: nowrap; }
.lightbox-close,
.lightbox-nav {
    position: absolute;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.lightbox-close:hover,
.lightbox-nav:hover { background: var(--accent); color: var(--primary-dark); }
.lightbox-close { top: 16px; right: 16px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-nav[hidden] { display: none; }

@media (max-width: 600px) {
    .lightbox { padding: 70px 12px 96px; }
    .lightbox-img { max-height: calc(100vh - 220px); }
    .lightbox-caption { flex-direction: column; gap: 4px; font-size: 0.88rem; }
    .lightbox-nav { top: auto; bottom: 24px; transform: none; }
    .lightbox-prev { left: calc(50% - 60px); }
    .lightbox-next { right: calc(50% - 60px); }
}

/* Phones: the hero grows with its text, so nothing slides under the header
   or into the slider dots at the bottom */
@media (max-width: 768px) {
    .hero {
        height: auto;
        min-height: 100vh;
        min-height: 100svh;
        padding: 120px 0 90px;
    }
    .hero-subtitle { font-size: 0.8rem; letter-spacing: 2px; }
    .hero-slider-nav { bottom: 36px; }
    .scroll-down { display: none; }
}

/* Very small phones (320-400px): keep long headings inside the screen */
@media (max-width: 400px) {
    .section-title, .cta-title { font-size: 1.6rem; overflow-wrap: break-word; }
    .hero-title { font-size: 2.1rem; }
    .page-title { font-size: 2.1rem; }
}

@media (max-width: 1100px) {
    .project-grid, .scope-grid { grid-template-columns: repeat(2, 1fr); }
    .clients-grid.clients-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
    .project-grid, .scope-grid { grid-template-columns: 1fr; }
    .clients-grid.clients-5 { grid-template-columns: repeat(2, 1fr); }
    .logo-icon.logo-img, .header.scrolled .logo-icon.logo-img { width: 48px; height: 46px; }
}
