/*
Theme Name: Glad & Sons Plumbing
Theme URI: https://gladandsons.co.za
Author: Antigravity
Description: Premium modern custom theme for Glad & Sons Plumbing.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: glad-plumbing
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
    /* Color Tokens (Matching the logo's deep red and slate gray) */
    --primary: #c20f15;
    --primary-hover: #9c0c10;
    --primary-light: #fdf2f2;
    --secondary: #3a3f44;
    --secondary-hover: #2d3135;
    --dark: #1e2229;
    --light: #f8fafc;
    --white: #ffffff;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-600: #475569;
    
    /* Typography */
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    
    /* Layout & Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    background: var(--light);
    color: var(--dark);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--secondary);
    line-height: 1.25;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.container {
    width: 92%;
    max-width: 1280px;
    margin: 0 auto;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    padding: 0; /* Full height logo */
    transition: var(--transition);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 85px;
    width: auto;
    object-fit: contain;
    display: block;
}

.brand-text {
    display: none; /* Hide redundant text since logo image already has brand name & slogan */
}

.brand-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: -0.5px;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: -2px;
}

nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

nav a {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--secondary);
    position: relative;
    padding: 6px 0;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

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

nav a:hover::after, nav a.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    position: relative;
    color: var(--white);
    padding: 140px 0 160px 0;
    overflow: hidden;
    background: #1e2229; /* Dark fallback background */
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 0;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(30, 34, 41, 0.92) 0%, rgba(58, 63, 68, 0.85) 100%);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--primary) 1.5px, transparent 1.5px);
    background-size: 32px 32px;
    opacity: 0.08;
    z-index: 1;
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 2;
    max-width: 900px;
    text-align: center;
}

.hero h2 {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--white);
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero h2 span {
    color: var(--primary);
}

.hero p {
    font-size: 1.3rem;
    color: var(--gray-300);
    margin-bottom: 35px;
    font-weight: 300;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--white);
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    border-color: var(--white);
}

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

/* Services */
.services {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.section-header p {
    color: var(--gray-600);
    font-size: 1.1rem;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    opacity: 0;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.card:hover::before {
    opacity: 1;
}

.card-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--secondary);
}

.card p {
    color: var(--gray-600);
    font-size: 0.95rem;
}

/* About / Stats */
.about {
    background: var(--secondary);
    color: var(--white);
    padding: 100px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
}

.about h2 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.about p {
    color: var(--gray-300);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.about ul {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.about li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 1.05rem;
}

.about li::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: bold;
}

.about-image {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Showroom Page Specific Styles */
.showroom-intro {
    padding: 80px 0 40px 0;
}

.filter-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--white);
    border: 1px solid var(--gray-200);
    color: var(--secondary);
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

.gallery-item {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    cursor: pointer;
    padding-top: 75%; /* Force 4:3 grid aspect ratio directly on the item container */
}

.gallery-media {
    position: absolute;
    inset: 0;
    padding-top: 0;
    background: #000;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.gallery-media img,
.gallery-media video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-media img {
    transform: scale(1.05);
}

.gallery-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.gallery-info h3 {
    font-size: 1.15rem;
    color: var(--secondary);
    margin-bottom: 5px;
}

.gallery-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 1px;
}

/* Lightbox Modal */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.95);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 85vh;
}

.lightbox-content img,
.lightbox-content video {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-xl);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: var(--white);
    font-size: 2.5rem;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    transition: var(--transition);
}

.lightbox-close:hover {
    color: var(--primary);
}

.lightbox-caption {
    color: var(--white);
    text-align: center;
    margin-top: 15px;
    font-size: 1.1rem;
    font-family: var(--font-heading);
}

/* Video Badge */
.video-badge {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.play-icon {
    width: 64px;
    height: 64px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.gallery-item:hover .play-icon {
    transform: scale(1.1);
    background: var(--white);
    color: var(--primary);
}

/* Contact Page Specific Styles */
.contact-section {
    padding: 80px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
}

.contact-info-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

.info-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--secondary);
}

.info-card p {
    color: var(--gray-600);
}

.contact-form-container {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

.contact-form-container h3 {
    font-size: 1.8rem;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--secondary);
}

.form-control {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--dark);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

textarea.form-control {
    resize: vertical;
}

/* Footer */
footer {
    background: var(--secondary);
    color: var(--white);
    padding: 60px 0 30px 0;
    border-top: 5px solid var(--primary);
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo-img {
    height: 80px;
    width: auto;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.footer-brand-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
}

.footer-links {
    display: flex;
    gap: 30px;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    padding-top: 30px;
    text-align: center;
    color: var(--gray-300);
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    nav {
        gap: 20px;
    }
    
    .hero h2 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .about ul {
        grid-template-columns: 1fr;
    }
    
    .gallery {
        grid-template-columns: 1fr;
    }
}

/* Showroom Carousel Section */
.showroom-carousel-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 480px;
    margin: 30px auto 60px auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    background: #000;
}

.showroom-carousel-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.showroom-carousel-slide.active {
    opacity: 1;
}

.showroom-carousel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 100%);
    pointer-events: none;
}

.showroom-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.showroom-carousel-btn:hover {
    background: var(--primary);
    color: white;
}

.showroom-carousel-btn.prev {
    left: 20px;
}

.showroom-carousel-btn.next {
    right: 20px;
}

.showroom-carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.showroom-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.showroom-carousel-dot.active {
    background: var(--primary);
    width: 25px;
    border-radius: 5px;
}

@media (max-width: 768px) {
    .showroom-carousel-container {
        height: 300px;
    }
}
