/* ==========================================================================
   Codd Decorative Painting - Custom Styles
   Color Palette: Warm Earth Tones
   ========================================================================== */

:root {
    --color-primary: #C75B39;      /* Terracotta */
    --color-secondary: #8B9A7D;    /* Sage Green */
    --color-background: #F5F0E6;   /* Warm Cream */
    --color-accent: #5C4033;       /* Warm Brown */
    --color-text: #3D3D3D;         /* Charcoal */
    --color-white: #FDFBF7;        /* Soft White */
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

body {
    font-family: 'Nunito', sans-serif;
    color: var(--color-text);
    background-color: var(--color-white);
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    color: var(--color-accent);
}

a {
    color: var(--color-primary);
    transition: color 0.2s ease;
}

a:hover {
    color: #a94a2e;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
    background: var(--color-accent);
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    text-decoration: none;
}

.site-logo:hover {
    color: white;
}

.site-logo .logo-img {
    height: 50px;
    width: auto;
}

/* Navigation */
.site-header .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1rem;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.site-header .navbar-nav .nav-link:hover,
.site-header .navbar-nav .nav-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
}

.site-header .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
}

.site-header .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-accent) 0%, #7a5a4a 100%);
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 4rem 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(92, 64, 51, 0.85) 0%, rgba(92, 64, 51, 0.7) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: white;
    font-weight: 700;
}

.hero .lead {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--color-accent) 0%, #7a5a4a 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.page-header h1 {
    color: white;
    margin-bottom: 0.5rem;
}

.page-header .lead {
    opacity: 0.9;
    margin-bottom: 0;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

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

.btn-primary:hover {
    background-color: #a94a2e;
    border-color: #a94a2e;
    color: white;
}

.btn-outline-primary {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

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

.btn-outline-light {
    color: white;
    border-color: rgba(255, 255, 255, 0.8);
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
    color: white;
}

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

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

/* ==========================================================================
   Content Sections
   ========================================================================== */

.main-content {
    min-height: 60vh;
}

/* Services Section */
.services-section {
    padding: 5rem 0;
    background-color: var(--color-white);
}

.section-header {
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.section-header p {
    color: #6c757d;
    font-size: 1.1rem;
}

.service-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.service-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.service-card:hover .service-image img {
    transform: scale(1.05);
}

.service-card h3 {
    font-size: 1.25rem;
    margin: 1.25rem 1.5rem 0.5rem;
}

.service-card p {
    color: #6c757d;
    margin: 0 1.5rem 1rem;
    flex-grow: 1;
    font-size: 0.95rem;
    line-height: 1.6;
}

.service-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    margin: 0 1.5rem 1.5rem;
    display: inline-block;
}

.service-link:hover {
    color: #a94a2e;
}

/* Featured Section */
.featured-section {
    padding: 5rem 0;
    background-color: var(--color-background);
}

.featured-section .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 991.98px) {
    .featured-section .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575.98px) {
    .featured-section .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* About Section */
.about-section {
    padding: 5rem 0;
    background-color: var(--color-white);
}

.about-image {
    border-radius: 1rem;
    overflow: hidden;
}

.about-image-placeholder {
    aspect-ratio: 1;
    background: var(--color-background);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
}

.about-image-placeholder i {
    font-size: 6rem;
    color: var(--color-secondary);
    opacity: 0.5;
}

.about-content h2 {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
}

.about-content p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.about-contact-inline {
    color: var(--color-text);
    font-size: 0.95rem;
}

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

.about-contact-inline span {
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .about-cta {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .about-contact-inline span.mx-2 {
        display: none;
    }

    .about-contact-inline {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }
}

/* CTA Section */
.cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, #d86f4f 100%);
    color: white;
}

.cta-content h2 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 2rem;
}

/* ==========================================================================
   Gallery
   ========================================================================== */

.gallery-filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    background: var(--color-white);
    border-radius: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: var(--color-background);
    border: 1px solid transparent;
    border-radius: 2rem;
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.filter-pill:hover {
    background: white;
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-1px);
}

.filter-pill.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(199, 91, 57, 0.3);
}

.filter-pill .count {
    background: rgba(0, 0, 0, 0.08);
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 1.5rem;
    text-align: center;
}

.filter-pill.active .count {
    background: rgba(255, 255, 255, 0.25);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 0.75rem;
    cursor: pointer;
    background: var(--color-background);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(92, 64, 51, 0.85), transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 1.25rem;
    opacity: 0;
    transition: opacity 0.3s;
}

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

.gallery-item-overlay span {
    color: white;
    font-weight: 500;
    font-size: 1rem;
}

/* Gallery Pagination */
.gallery-pagination .pagination {
    gap: 0.25rem;
}

.gallery-pagination .page-link {
    border: none;
    background: var(--color-white);
    color: var(--color-text);
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s;
}

.gallery-pagination .page-link:hover {
    background: var(--color-background);
    color: var(--color-primary);
}

.gallery-pagination .page-item.active .page-link {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(199, 91, 57, 0.3);
}

.gallery-pagination .page-item.disabled .page-link {
    background: transparent;
    color: #adb5bd;
}

/* ==========================================================================
   Lightbox
   ========================================================================== */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    z-index: 10;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-caption {
    color: white;
    margin-top: 1rem;
    font-size: 1.1rem;
    text-align: center;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s, background 0.2s;
}

.lightbox-nav:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background: var(--color-accent);
    color: white;
    padding: 4rem 0 2rem;
}

.site-footer h3 {
    color: white;
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.site-footer h5 {
    color: var(--color-primary);
    font-size: 1rem;
    margin-bottom: 1rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
}

.site-footer p {
    opacity: 0.9;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s;
}

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

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer li {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    margin-top: 3rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.empty-state {
    padding: 4rem 2rem;
}

.empty-state i {
    font-size: 4rem;
    color: var(--color-secondary);
    opacity: 0.5;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 991.98px) {
    .site-logo .logo-img {
        height: 40px;
    }

    .site-header .navbar-collapse {
        background: rgba(0, 0, 0, 0.1);
        margin-top: 0.5rem;
        padding: 0.5rem;
        border-radius: 0.25rem;
    }

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

@media (max-width: 767.98px) {
    .hero {
        min-height: 60vh;
    }

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

    .hero .lead {
        font-size: 1rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }

    .services-section,
    .featured-section,
    .about-section,
    .cta-section {
        padding: 3rem 0;
    }
}
