/**
 * Southern Home Installation - Main Stylesheet
 * Clean, professional styling for appliance installation website
 */

/* ============================================
   CUSTOM FONTS
   ============================================ */
@font-face {
    font-family: 'StephenType';
    src: url('../fonts/StephenType.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ============================================
   CSS VARIABLES - Easy customization
   ============================================ */
:root {
    /* Color Palette */
    --color-primary: #2c5f7c;
    --color-primary-dark: #1e4558;
    --color-secondary: #c8a876;
    --color-accent: #8b6f47;

    --color-text: #333333;
    --color-text-light: #666666;
    --color-text-lighter: #999999;

    --color-bg: #ffffff;
    --color-bg-light: #f8f9fa;
    --color-bg-dark: #2c3e50;

    --color-border: #e0e0e0;
    --color-success: #28a745;
    --color-error: #dc3545;

    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-heading: Georgia, "Times New Roman", serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;

    /* Layout */
    --container-width: 1200px;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

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

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

a:hover {
    color: var(--color-primary-dark);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.3;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: var(--spacing-sm);
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.site-header {
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: var(--spacing-sm) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

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

.logo-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
}

.logo img {
    max-height: 80px;
}

.hero-company-name {
    font-family: 'StephenType', serif;
    font-size: 10.5rem;
    color: white;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
}

.main-nav a {
    color: var(--color-text);
    font-weight: 500;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

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

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--color-text);
    transition: var(--transition);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    padding: var(--spacing-xl) 0;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.2);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
    color: white;
}

.hero h1.hero-company-name {
    font-size: 8rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.95;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
}

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

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

.btn-large {
    padding: 16px 40px;
    font-size: 1.125rem;
}

/* ============================================
   SECTIONS
   ============================================ */
section {
    padding: var(--spacing-xl) 0;
}

.page-header {
    background: var(--color-bg-light);
    text-align: center;
    padding: var(--spacing-lg) 0;
    border-bottom: 1px solid var(--color-border);
}

.page-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-light);
}

/* ============================================
   GRIDS
   ============================================ */
.services-grid,
.features-grid,
.values-grid,
.stats-grid,
.gallery-grid {
    display: grid;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-md);
    grid-template-columns: repeat(3, 1fr);
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.services-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.features-grid,
.values-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ============================================
   CARDS
   ============================================ */
.service-card,
.value-card,
.review-card {
    background: var(--color-bg);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    transition: var(--transition);
}

.service-card:hover,
.value-card:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

.service-icon {
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}

.service-card h3,
.value-card h3 {
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}

a.service-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

a.service-card:hover {
    color: inherit;
}

/* ============================================
   REVIEWS SECTION
   ============================================ */
.reviews-section {
    background: var(--color-bg-light);
}

.reviews-section h2 {
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.review-card {
    background: white;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: var(--spacing-sm);
}

.reviewer-info {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.reviewer-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.review-rating .star {
    color: var(--color-secondary);
    font-size: 1.125rem;
}

.review-rating .star.filled {
    color: #ffa500;
}

.review-text {
    color: var(--color-text-light);
    line-height: 1.6;
}

.reviews-placeholder {
    text-align: center;
    padding: var(--spacing-lg);
    background: white;
    border-radius: var(--border-radius);
    border: 2px dashed var(--color-border);
}

.setup-instructions {
    color: var(--color-text-lighter);
    font-size: 0.875rem;
}

.google-attribution {
    text-align: center;
    margin-top: var(--spacing-md);
}

.google-logo {
    max-width: 150px;
    margin: 0 auto;
}

/* ============================================
   PORTFOLIO/GALLERY
   ============================================ */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    cursor: pointer;
}

.gallery-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.1);
}

.gallery-info {
    color: white;
    text-align: center;
    padding: var(--spacing-md);
}

.gallery-info h3 {
    color: white;
    margin-bottom: var(--spacing-xs);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    margin: auto;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 60px;
    padding: 20px 15px;
    cursor: pointer;
    z-index: 10001;
    transition: var(--transition);
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-caption {
    text-align: center;
    color: white;
    padding: var(--spacing-sm);
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    z-index: 10000;
}

.gallery-title {
    color: var(--color-primary);
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
    text-align: center;
}

/* Portfolio Stats */
.portfolio-stats {
    background: var(--color-primary);
    color: white;
}

.portfolio-stats h2 {
    text-align: center;
    color: white;
    margin-bottom: var(--spacing-md);
}

.stat-item {
    text-align: center;
    padding: var(--spacing-md);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--color-secondary);
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* ============================================
   ABOUT PAGE
   ============================================ */
.about-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: start;
}

.about-text h2,
.about-text h3 {
    color: var(--color-primary);
    margin-top: var(--spacing-md);
}

.about-image img {
    border-radius: var(--border-radius);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.services-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.service-item {
    background: var(--color-bg-light);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
}

.service-item h4 {
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--color-secondary);
    padding-bottom: var(--spacing-xs);
}

.service-item ul {
    list-style: none;
    padding-left: 0;
}

.service-item li {
    padding: var(--spacing-xs) 0;
    color: var(--color-text-light);
}

.service-item li:before {
    content: "✓ ";
    color: var(--color-secondary);
    font-weight: bold;
    margin-right: var(--spacing-xs);
}

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-md);
}

.contact-form-wrapper,
.contact-info {
    background: var(--color-bg-light);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
}

.contact-form-wrapper h2,
.contact-info h2 {
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
}

/* Form Styles */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    color: var(--color-text);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(44, 95, 124, 0.1);
}

/* Contact Info Items */
.contact-info-item {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--color-border);
}

.contact-info-item:last-of-type {
    border-bottom: none;
}

.contact-icon {
    color: var(--color-primary);
    flex-shrink: 0;
}

.contact-info-item h3 {
    font-size: 1rem;
    margin-bottom: var(--spacing-xs);
    color: var(--color-primary);
}

.contact-info-item p {
    margin: 0;
    color: var(--color-text-light);
}

.emergency-note {
    background: var(--color-primary);
    color: white;
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    margin-top: var(--spacing-md);
}

.emergency-note strong {
    display: block;
    margin-bottom: var(--spacing-xs);
}

/* Alerts */
.alert {
    padding: var(--spacing-sm);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-md);
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* ============================================
   CTA SECTIONS
   ============================================ */
.cta-section {
    background: var(--color-bg-light);
    text-align: center;
}

.cta-section h2 {
    margin-bottom: var(--spacing-sm);
}

.cta-section p {
    font-size: 1.125rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
}

.services-overview,
.why-choose-us,
.values-section,
.services-detail,
.brands-section,
.service-areas {
    text-align: center;
}

.section-intro {
    max-width: 800px;
    margin: 0 auto var(--spacing-lg);
    color: var(--color-text-light);
    font-size: 1.1rem;
    line-height: 1.7;
}

.brands-section {
    background: var(--color-bg-light);
}

.services-overview h2,
.why-choose-us h2,
.values-section h2,
.services-detail h2,
.about-content h2,
.brands-section h2,
.service-areas h2 {
    text-align: center;
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
}

.feature h3 {
    color: var(--color-primary);
    margin-bottom: var(--spacing-xs);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--color-bg-dark);
    color: white;
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.footer-section h3 {
    color: var(--color-secondary);
    margin-bottom: var(--spacing-sm);
}

.footer-section p,
.footer-section a {
    color: rgba(255,255,255,0.8);
    margin-bottom: var(--spacing-xs);
}

.footer-section a:hover {
    color: white;
}

.brand-logos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
}

.brand-logo {
    background: transparent;
    padding: var(--spacing-sm);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo img {
    max-height: 50px;
    width: auto;
    opacity: 0.85;
    transition: var(--transition);
}

.brand-logo:hover img {
    opacity: 1;
    transform: scale(1.05);
}

.social-links {
    display: flex;
    gap: var(--spacing-sm);
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--color-secondary);
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom p {
    margin: 0;
    color: rgba(255,255,255,0.6);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .main-nav {
        display: none;
    }

    .main-nav.active {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }

    .main-nav.active ul {
        flex-direction: column;
        padding: var(--spacing-sm);
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero h1.hero-company-name {
        font-size: 3rem;
        font-family: 'StephenType', serif;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    }

    .hero-cta {
        flex-direction: column;
    }

    .about-layout,
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .services-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }

    .hero {
        min-height: 400px;
        padding: var(--spacing-lg) 0;
    }

    .btn {
        display: block;
        width: 100%;
    }

    .brand-logos {
        grid-template-columns: repeat(2, 1fr);
    }
}
