/**
 * Harris Construction - Main Stylesheet
 * Modern, responsive design for construction website
 */

/* =====================================================
   CSS VARIABLES
   ===================================================== */
:root {
    /* Colors */
    --primary-color: #d4a574;
    --primary-dark: #b8894f;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --text-dark: #333333;
    --text-light: #666666;
    --text-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-dark: #1a1a1a;
    --border-color: #e0e0e0;
    
    /* Typography */
    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Open Sans', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-secondary);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--text-white);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

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

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

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

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

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

ul {
    list-style: none;
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--spacing-sm);
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

.pt-1 { padding-top: var(--spacing-xs); }
.pt-2 { padding-top: var(--spacing-sm); }
.pt-3 { padding-top: var(--spacing-md); }
.pt-4 { padding-top: var(--spacing-lg); }

.pb-1 { padding-bottom: var(--spacing-xs); }
.pb-2 { padding-bottom: var(--spacing-sm); }
.pb-3 { padding-bottom: var(--spacing-md); }
.pb-4 { padding-bottom: var(--spacing-lg); }

/* =====================================================
   HEADER STYLES
   ===================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--text-white);
    box-shadow: var(--shadow-md);
}

/* Top Bar */
.top-bar {
    background: var(--secondary-color);
    color: var(--text-white);
    padding: var(--spacing-xs) 0;
    font-size: 0.875rem;
}

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

.top-bar-link {
    color: var(--text-white);
    margin-right: var(--spacing-sm);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.top-bar-link:hover {
    color: var(--primary-color);
}

/* Main Navigation */
.main-nav {
    padding: var(--spacing-sm) 0;
}

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

.logo h1 {
    font-size: 1.75rem;
    color: var(--secondary-color);
    margin: 0;
}

.logo .tagline {
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: var(--text-dark);
    font-weight: 500;
    font-family: var(--font-primary);
    padding: var(--spacing-xs) var(--spacing-sm);
    display: block;
    transition: var(--transition-fast);
}

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

.btn-contact {
    background: var(--primary-color);
    color: var(--text-white) !important;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: 4px;
}

.btn-contact:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Dropdown Menu */
.has-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--text-white);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-normal);
    border-radius: 4px;
    padding: var(--spacing-xs) 0;
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    border-bottom: 1px solid var(--border-color);
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu a {
    padding: var(--spacing-sm);
    white-space: nowrap;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
}

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

/* =====================================================
   FLASH MESSAGES
   ===================================================== */
.flash-message {
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    border-radius: 4px;
    position: relative;
}

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

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

.flash-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.flash-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.flash-close {
    position: absolute;
    right: var(--spacing-sm);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.7;
}

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

/* =====================================================
   HERO SECTION
   ===================================================== */
.hero {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
    padding: var(--spacing-xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" opacity=".25" fill="%23ffffff"/><path d="M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z" opacity=".5" fill="%23ffffff"/><path d="M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z" fill="%23ffffff"/></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.1;
}

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

.hero h1 {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

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

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-normal);
    border: 2px solid transparent;
    font-family: var(--font-primary);
}

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

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

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

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

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

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

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

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: var(--spacing-sm);
}

.section-title p {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

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

/* =====================================================
   GRID LAYOUTS
   ===================================================== */
.grid {
    display: grid;
    gap: var(--spacing-md);
}

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

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

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

/* =====================================================
   CARDS
   ===================================================== */
.card {
    background: var(--text-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.card-content {
    padding: var(--spacing-md);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--secondary-color);
}

.card-text {
    color: var(--text-light);
    margin-bottom: var(--spacing-sm);
}

.card-footer {
    padding: var(--spacing-sm) var(--spacing-md);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* =====================================================
   FORMS
   ===================================================== */
.form-group {
    margin-bottom: var(--spacing-md);
}

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

.form-control {
    width: 100%;
    padding: var(--spacing-sm);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: var(--font-secondary);
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.1);
}

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

select.form-control {
    cursor: pointer;
}

.form-error {
    color: var(--accent-color);
    font-size: 0.875rem;
    margin-top: var(--spacing-xs);
}

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer {
    background: var(--bg-dark);
    color: var(--text-white);
}

.footer-main {
    padding: var(--spacing-xl) 0 var(--spacing-md);
}

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

.footer-column h3,
.footer-column h4 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

.footer-column h5 {
    color: var(--text-white);
    font-size: 1rem;
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-xs);
}

.footer-tagline {
    color: var(--primary-color);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--spacing-sm);
}

.footer-links li {
    margin-bottom: var(--spacing-xs);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-contact-item {
    margin-bottom: var(--spacing-md);
}

.footer-contact-item p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-xs);
}

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

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

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

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

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

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

.footer-bottom-links {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.6);
}

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

/* =====================================================
   BACK TO TOP BUTTON
   ===================================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--text-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-normal);
    z-index: 999;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
}

.back-to-top.show {
    display: flex;
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--text-white);
        flex-direction: column;
        padding: var(--spacing-md);
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition-normal);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: var(--spacing-md);
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    .top-bar-content {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .section {
        padding: var(--spacing-md) 0;
    }
}