/* ============================================
   ARTISAN GLASS DESIGNS - MAIN STYLESHEET v3
   Brand: Boutique Upscale meets Friendly & Approachable
   Updated: Hybrid layout, fixed 4+2 and 3+3 grid layouts
   ============================================ */

/* ===== CSS RESET & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #333333;
    line-height: 1.6;
    background-color: #ffffff;
    overflow-x: hidden;
}

/* ===== BRAND COLORS ===== */
:root {
    --primary: #19426f;
    --secondary: #5a8fcb;
    --accent: #2e6ab4;
    --text: #333333;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --bg-cream: #faf8f5;
    --gold: #d4a574;
    --white: #ffffff;
    --border: #e5e5e5;
    --shadow: 0 4px 20px rgba(25, 66, 111, 0.08);
    --shadow-hover: 0 8px 30px rgba(25, 66, 111, 0.15);
    --transition: all 0.3s ease;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    color: var(--primary);
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
    color: var(--text);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary);
}

/* ===== LAYOUT CONTAINERS ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 5rem 0;
}

@media (max-width: 768px) {
    section { padding: 3rem 0; }
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--accent);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-secondary:hover {
    background-color: var(--primary);
    color: var(--white);
}

.btn-large {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
}

/* ===== HEADER / NAVIGATION ===== */
.site-header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background-color: var(--primary);
    color: var(--white);
    padding: 0.5rem 0;
    font-size: 0.875rem;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-top a {
    color: var(--white);
}

.header-top a:hover {
    color: var(--gold);
}

.header-main {
    padding: 1rem 0;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo img {
    height: 50px;
    width: auto;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.logo-tagline {
    font-size: 0.75rem;
    color: var(--text-light);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.main-nav a {
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.main-nav a:hover {
    color: var(--primary);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--gold);
    transition: var(--transition);
}

.main-nav a:hover::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary);
    margin: 5px 0;
    transition: var(--transition);
}

@media (max-width: 968px) {
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background-color: var(--white);
        padding: 5rem 2rem 2rem;
        box-shadow: -5px 0 20px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
    }

    .main-nav.active {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }

    .mobile-toggle {
        display: block;
        z-index: 1001;
    }

    .mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }

    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
}

/* ===== SPLIT HERO (for portrait photos) ===== */
.hero-split {
    background: linear-gradient(135deg, var(--bg-cream) 0%, var(--white) 100%);
    padding: 4rem 0;
    overflow: hidden;
    min-height: auto;
}

@media (min-width: 969px) {
    .hero-split {
        min-height: 600px;
    }
}

.hero-split .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-split-content {
    padding: 2rem 0;
}

.hero-split h1 {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.hero-split .subtitle {
    font-size: 1.25rem;
    color: var(--text);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero-split-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(25, 66, 111, 0.2);
    aspect-ratio: 4 / 5;
    background-color: var(--bg-light);
    max-width: 450px;
    max-height: 560px;
    margin-left: auto;
    margin-right: 0;
    width: 100%;
}

.hero-split-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.hero-split-image::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: var(--gold);
    opacity: 0.15;
    border-radius: 50%;
    z-index: -1;
}

.hero-split-image::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: -20px;
    width: 80px;
    height: 80px;
    background: var(--secondary);
    opacity: 0.2;
    border-radius: 50%;
    z-index: -1;
}

.hero-split-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 968px) {
    .hero-split .container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hero-split-image {
        max-width: 380px;
        max-height: 480px;
        margin: 0 auto;
        aspect-ratio: 4 / 5;
    }

    .hero-split-content {
        text-align: center;
        padding: 0;
    }

    .hero-split-buttons {
        justify-content: center;
    }
}

/* ===== ORIGINAL HERO (still available for landscape photos) ===== */
.hero {
    background: linear-gradient(135deg, rgba(25, 66, 111, 0.85) 0%, rgba(46, 106, 180, 0.75) 100%),
                url('../images/hero-shower-door.jpg') center/cover no-repeat;
    color: var(--white);
    padding: 8rem 0;
    text-align: center;
    position: relative;
}

.hero h1 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.hero .subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero .btn-primary {
    background-color: var(--gold);
    color: var(--primary);
}

.hero .btn-primary:hover {
    background-color: var(--white);
}

.hero .btn-secondary {
    color: var(--white);
    border-color: var(--white);
}

.hero .btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary);
}

/* ===== TRUST BAR ===== */
.trust-bar {
    background-color: var(--bg-light);
    padding: 2rem 0;
    border-bottom: 1px solid var(--border);
}

.trust-bar .container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    text-align: center;
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.trust-number {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.trust-label {
    font-size: 0.875rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== SECTION HEADINGS ===== */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-eyebrow {
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
    display: block;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-light);
}

/* ===== SERVICES GRID (PORTRAIT-FRIENDLY) ===== */
.services-section {
    background-color: var(--white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    background-color: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary);
}

.service-card-image {
    width: 100%;
    aspect-ratio: 3 / 4;
    background-color: var(--bg-light);
    background-size: cover;
    background-position: center;
}

.service-card-body {
    padding: 1.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.service-card h3 {
    margin-bottom: 0.5rem;
}

.service-card-price {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.service-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    flex-grow: 1;
}

.service-card-link {
    margin-top: 1rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.service-card-link::after {
    content: ' →';
    transition: var(--transition);
}

.service-card:hover .service-card-link::after {
    margin-left: 0.5rem;
}

/* ===== WHY CHOOSE US (BASE) ===== */
.why-section {
    background-color: var(--bg-cream);
    position: relative;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.why-item {
    text-align: center;
}

.why-icon {
    width: 70px;
    height: 70px;
    background-color: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.75rem;
}

.why-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.why-item p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ===== CUSTOM WHY GRID (3 + 3 with bottom row centered) ===== */
.why-grid-custom {
    margin-top: 3rem;
}

.why-row-top {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.why-row-bottom {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .why-row-top,
    .why-row-bottom {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 600px) {
    .why-row-top,
    .why-row-bottom {
        grid-template-columns: 1fr;
    }
}

/* ===== PROCESS SECTION (BASE) ===== */
.process-section {
    background-color: var(--white);
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    counter-reset: step;
}

.process-step {
    text-align: center;
    position: relative;
}

.process-number {
    width: 60px;
    height: 60px;
    background-color: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.process-step h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.process-step p {
    font-size: 0.95rem;
    color: var(--text-light);
}

/* ===== CUSTOM PROCESS LAYOUT (4 + 2 with bottom row centered) ===== */
.process-steps-custom {
    margin-top: 3rem;
}

.process-row-top {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.process-row-bottom {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .process-row-top {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .process-row-bottom {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

@media (max-width: 480px) {
    .process-row-top,
    .process-row-bottom {
        grid-template-columns: 1fr;
    }
}

/* ===== TESTIMONIALS ===== */
.testimonials-section {
    background-color: var(--primary);
    color: var(--white);
}

.testimonials-section h2,
.testimonials-section .section-eyebrow {
    color: var(--white);
}

.testimonials-section .section-eyebrow {
    color: var(--gold);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.testimonial-card {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.testimonial-stars {
    color: var(--gold);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.testimonial-author {
    font-weight: 600;
    color: var(--gold);
    font-size: 0.95rem;
}

/* ===== CTA SECTION ===== */
.cta-section {
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
    color: var(--white);
    text-align: center;
}

.cta-section h2 {
    color: var(--white);
}

.cta-section p {
    color: var(--white);
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-section .btn-primary {
    background-color: var(--gold);
    color: var(--primary);
}

.cta-section .btn-primary:hover {
    background-color: var(--white);
}

/* ===== MASONRY GALLERY (handles any photo orientation) ===== */
.masonry-gallery {
    columns: 3 300px;
    column-gap: 1.5rem;
    margin-top: 2rem;
}

.masonry-gallery-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.masonry-gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.masonry-gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

@media (max-width: 768px) {
    .masonry-gallery {
        columns: 2 200px;
        column-gap: 1rem;
    }

    .masonry-gallery-item {
        margin-bottom: 1rem;
    }
}

/* ===== FOOTER ===== */
.site-footer {
    background-color: #0d2e4f;
    color: var(--white);
    padding: 4rem 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: var(--gold);
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.25rem;
}

.footer-col p,
.footer-col a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    line-height: 1.8;
}

.footer-col a:hover {
    color: var(--gold);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.85);
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.8s ease forwards;
}

/* ===== RESPONSIVE TWEAKS ===== */
@media (max-width: 768px) {
    .hero {
        padding: 5rem 0;
    }

    .header-top {
        font-size: 0.75rem;
    }

    .header-top .container {
        justify-content: center;
        text-align: center;
    }

    .trust-bar .container {
        gap: 1rem;
    }

    .trust-number {
        font-size: 1.5rem;
    }
}
