/**
 * Essentials Creative - Core CSS Framework v4.0
 * Unified styles for consistent site-wide experience
 */

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */

/* Modern CSS Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: 'Apercu', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background: #ffffff;
    overflow-x: hidden;
}

/* ==========================================================================
   TYPOGRAPHY SYSTEM
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

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: clamp(1.25rem, 2.5vw, 1.75rem); }
h5 { font-size: clamp(1.125rem, 2vw, 1.5rem); }
h6 { font-size: clamp(1rem, 1.5vw, 1.25rem); }

p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

a {
    color: #1a1a1a;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #666;
}

/* ==========================================================================
   LAYOUT SYSTEM
   ========================================================================== */

/* Container System */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Section System */
.section {
    padding: 4rem 0;
}

.section-large {
    padding: 6rem 0;
}

.section-small {
    padding: 2rem 0;
}

.section-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Content Alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.content-centered {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

/* ==========================================================================
   HERO SECTIONS
   ========================================================================== */

.hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1a1a1a;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.1) 40%, rgba(0,0,0,0.25) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    max-width: 900px;
    padding: 0 2rem;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: #ffffff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    font-weight: 400;
    line-height: 1.6;
    margin: 0 auto;
    max-width: 600px;
    text-align: center;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

.hero-logo {
    max-width: 100%;
    height: auto;
    margin-bottom: 2rem;
}

/* ==========================================================================
   MAIN CONTENT LAYOUT
   ========================================================================== */

main {
    position: relative;
    z-index: 1;
}

.main-content {
    padding-bottom: 4rem;
    position: relative;
}

/* ==========================================================================
   NAVIGATION SYSTEM
   ========================================================================== */

.breadcrumb-nav {
    background: rgba(255, 255, 255, 0.98);
    padding: 1rem 0;
    border: none;
    margin: 0;
    margin-top: 70px; /* Account for fixed header */
    position: relative;
    z-index: 10;
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}

.breadcrumb-link {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-link:hover {
    color: #1a1a1a;
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 0.5rem;
    color: #999;
}

.breadcrumb-current {
    color: #1a1a1a;
    font-weight: 600;
}

/* ==========================================================================
   HERO SECTIONS
   ========================================================================== */

.hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    margin-top: 70px; /* Account for fixed header */
}

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

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 2rem;
    max-width: 800px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.6;
    opacity: 0.95;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* ==========================================================================
   GALLERY SYSTEM
   ========================================================================== */

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

.gallery-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #f5f5f5;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 1/1;
}

.gallery-item-with-caption {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #f5f5f5;
}

.gallery-item-with-caption:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.gallery-item-with-caption img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 1/1;
}

.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 1rem;
    font-size: 0.875rem;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.gallery-item-with-caption:hover .image-caption {
    opacity: 1;
    transform: translateY(0);
}

.caption-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.caption-type {
    font-size: 0.8rem;
    opacity: 0.9;
    font-style: italic;
}

.gallery-section-header {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    text-align: center;
    margin: 2rem 0 1rem;
    padding: 0.5rem 0;
    border-bottom: 2px solid #e9ecef;
}

/* ==========================================================================
   BUTTON SYSTEM
   ========================================================================== */

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}

.btn-primary {
    background: #1a1a1a;
    color: white;
}

.btn-primary:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: transparent;
    color: #1a1a1a;
    border: 2px solid #1a1a1a;
}

.btn-secondary:hover {
    background: #1a1a1a;
    color: white;
}

.btn-large {
    padding: 1.25rem 3rem;
    font-size: 1.125rem;
}

/* ==========================================================================
   FORM SYSTEM
   ========================================================================== */

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1a1a1a;
}

.form-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Contact Section Styles */
.contact-section {
    text-align: center;
    padding: 4rem 2rem;
    background: #f9f9f9;
    margin: 4rem auto 6rem;
    border-radius: 12px;
    max-width: 1200px;
    position: relative;
    z-index: 1;
    clear: both;
}

.contact-section .container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
}

.contact-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.contact-section p {
    font-size: 1.125rem;
    color: #666;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Featured Projects Styles */
.featured-projects {
    padding: 4rem 0;
    background: #fafafa;
}

.featured-projects h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #1a1a1a;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.project-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

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

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

.project-card:hover .project-image img {
    transform: scale(1.08);
}

.project-card h3 {
    font-size: 1.5rem;
    margin: 1.5rem 1.5rem 0.5rem;
    color: #1a1a1a;
    font-weight: 600;
}

.project-card p {
    color: #666;
    line-height: 1.6;
    margin: 0 1.5rem 1.5rem;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .featured-projects {
        padding: 2rem 0;
    }
    
    .featured-projects h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .project-card h3 {
        font-size: 1.25rem;
        margin: 1rem 1rem 0.5rem;
    }
    
    .project-card p {
        margin: 0 1rem 1rem;
        font-size: 0.9rem;
    }
}

/* ==========================================================================
   FOOTER STYLES
   ========================================================================== */

.footer {
    position: relative;
    color: white;
    background-size: cover;
    background-position: center center;
    padding: 4rem 0 2rem;
}

.footer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 1;
}

.footer-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-newsletter {
    max-width: 900px;
    margin: 0 auto 4rem;
    text-align: center;
}

.footer-newsletter h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.footer-newsletter p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.9);
    margin-bottom: 2rem;
}

.newsletter-form {
    display: flex;
    gap: 0.75rem;
    max-width: 500px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.newsletter-form input[type="email"] {
    flex: 1;
    min-width: 0;
    width: 100%;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.newsletter-form input[type="email"]::placeholder {
    color: rgba(255,255,255,0.7);
}

.newsletter-form .btn-secondary {
    padding: 1rem 2.5rem;
    background: white;
    color: #2c5f2d;
    font-weight: 700;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.footer-section h3,
.footer-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    color: rgba(255,255,255,0.8);
    line-height: 1.6;
    margin-bottom: 0;
}

.footer-services {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-services p {
    margin-bottom: 0;
}

.footer-services a,
.footer-social a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-services a:hover,
.footer-social a:hover {
    color: white;
}

.footer-social {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .contact-section {
        margin: 2rem 1rem 4rem;
        padding: 2rem 1rem;
    }
    
    .main-content {
        padding-bottom: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .newsletter-form {
        flex-direction: column;
        align-items: center;
    }
    
    .newsletter-form input[type="email"],
    .newsletter-form .btn-secondary {
        width: 100%;
        max-width: 400px;
    }
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

/* Spacing */
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* Display */
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* Flex utilities */
.justify-center { justify-content: center; }
.align-center { align-items: center; }
.flex-column { flex-direction: column; }

/* Colors */
.text-primary { color: #1a1a1a; }
.text-secondary { color: #666; }
.text-white { color: white; }

.bg-primary { background-color: #1a1a1a; }
.bg-light { background-color: #f8f9fa; }
.bg-white { background-color: white; }

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

/* Tablet */
@media (max-width: 768px) {
    .container,
    .container-wide,
    .container-narrow {
        padding: 0 1.5rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .section-large {
        padding: 4rem 0;
    }
    
    .hero {
        min-height: 60vh;
    }
    
    .hero-content {
        padding: 0 1.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .container,
    .container-wide,
    .container-narrow {
        padding: 0 1rem;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .section-large {
        padding: 3rem 0;
    }
    
    .hero {
        min-height: 50vh;
    }
    
    .hero-content {
        padding: 0 1rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .btn {
        padding: 0.875rem 2rem;
        width: 100%;
    }
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

/* Focus states */
*:focus {
    outline: 2px solid #1a1a1a;
    outline-offset: 2px;
}

.btn:focus,
.form-input:focus {
    outline: 2px solid #1a1a1a;
    outline-offset: 2px;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .hero-overlay {
        background: rgba(0,0,0,0.8);
    }
    
    .image-caption {
        background: rgba(0,0,0,0.9);
    }
}