/* ==========================================================================
   MAILSON CONSTRUCTION SERVICE - Core Stylesheet
   ========================================================================== */

/* Design System Variables */
:root {
    --primary: #ff6b00;
    --primary-hover: #e05e00;
    --dark-bg: #121212;
    --dark-card: #1c1c1c;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --text-light: #f8fafc;
    --border-color: #e2e8f0;
    
    /* Typography */
    --font-heading: 'Outfit', 'Roboto', sans-serif;
    --font-body: 'Roboto', sans-serif;
    
    /* Transitions & Shadows */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-hover: 0 20px 25px -5px rgba(0,0,0,0.15), 0 10px 10px -5px rgba(0,0,0,0.04);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--dark-bg);
    line-height: 1.2;
}

p {
    margin-bottom: 1rem;
}

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

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.highlight {
    color: var(--primary);
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.py-60 { padding: 60px 0; }
.bg-dark { background-color: var(--dark-bg); color: var(--text-light); }
.bg-light { background-color: var(--light-bg); }

/* Buttons */
.btn-orange {
    background-color: var(--primary);
    color: var(--white) !important;
    padding: 12px 28px;
    font-weight: 700;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary);
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

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

.btn-dark {
    background-color: var(--dark-bg);
    color: var(--white) !important;
    padding: 12px 28px;
    font-weight: 700;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--dark-bg);
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.btn-dark:hover {
    background-color: #000;
    border-color: #000;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.main-header {
    background-color: var(--dark-bg);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    padding: 10px 0;
    transition: var(--transition);
}

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

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.main-nav {
    margin-left: auto;
    margin-right: 30px;
}

.nav-menu {
    display: flex;
    gap: 25px;
    list-style: none;
}

.nav-menu a {
    color: var(--text-light);
    font-weight: 700;
    font-size: 15px;
    font-family: var(--font-heading);
    padding: 8px 0;
    position: relative;
    letter-spacing: 0.5px;
}

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

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

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

.header-phone-btn {
    background-color: var(--primary);
    color: var(--white) !important;
    font-weight: 700;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 4px;
    white-space: nowrap;
}

.header-phone-btn:hover {
    background-color: var(--primary-hover);
    transform: scale(1.03);
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--white);
    margin: 5px 0;
    transition: var(--transition);
}

/* Active Hamburger Animation */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6deg);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)), url("images/worker-placeholder.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 80vh;
    display: flex;
    align-items: center;
    color: var(--white);
    padding: 60px 0;
}

.hero-content {
    max-width: 650px;
    text-align: left;
}

.hero h1 {
    font-size: 48px;
    font-weight: 900;
    color: var(--white);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.hero p {
    font-size: 18px;
    color: #cbd5e1;
    margin-bottom: 30px;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

/* ==========================================================================
   SERVICES SECTION (Our Services)
   ========================================================================== */
.services-section {
    background-color: var(--dark-bg);
    color: var(--white);
    padding: 80px 0;
}

.services-section .section-title {
    color: var(--white);
    font-size: 36px;
    text-transform: uppercase;
    margin-bottom: 50px;
    position: relative;
}

.services-section .section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary);
    margin: 15px auto 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.service-card {
    background-color: var(--white);
    color: var(--text-dark);
    padding: 40px 25px;
    border-radius: 6px;
    text-align: center;
    transition: var(--transition);
    border-bottom: 4px solid transparent;
    box-shadow: var(--shadow-md);
}

.service-card:hover {
    transform: translateY(-8px);
    border-bottom-color: var(--primary);
    box-shadow: var(--shadow-hover);
}

.s-icon {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
}

.s-icon img {
    height: 110px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.service-card:hover .s-icon img {
    transform: scale(1.1);
}

.service-card h3 {
    font-size: 18px;
    margin-bottom: 15px;
    text-transform: uppercase;
    color: var(--dark-bg);
}

.service-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ==========================================================================
   PROJECTS SECTION (Projects We Build)
   ========================================================================== */
.projects-section {
    padding: 80px 0;
    background-color: var(--light-bg);
}

.projects-section .section-title {
    font-size: 36px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.projects-subtitle {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 40px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.project-item {
    position: relative;
    height: 250px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.proj-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.project-item:hover .proj-img {
    transform: scale(1.1);
}

/* Background image mappings */
.img-1 { background-image: url("images/bg-project-house-home.png"); }
.img-2 { background-image: url("images/bg-stair-porch.png"); }
.img-3 { background-image: url("images/comercial-framing.png"); }
.img-4 { background-image: url("images/bg-build-construction-home.png"); }

.proj-label {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: var(--white);
    padding: 20px;
    transition: var(--transition);
}

.proj-label h3 {
    font-size: 16px;
    color: var(--white);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.proj-label p {
    font-size: 12px;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0;
    text-transform: uppercase;
}

/* ==========================================================================
   WHY CHOOSE US SECTION
   ========================================================================== */
.why-choose-us {
    display: flex;
    min-height: 400px;
}

.why-left {
    flex: 1;
    background-color: var(--primary);
    color: var(--white);
    padding: 60px 40px 60px 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.why-left h2 {
    color: var(--white);
    font-size: 38px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.why-left p {
    font-size: 18px;
    opacity: 0.9;
    font-weight: 500;
}

.why-right {
    flex: 2;
    background-color: #161616;
    color: var(--white);
    padding: 60px 80px 60px 40px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    align-content: center;
}

.why-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.why-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--white);
    font-size: 20px;
}

.why-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.why-text h3 {
    font-size: 16px;
    color: var(--white);
    margin-bottom: 5px;
    text-transform: uppercase;
}

.why-text p {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 0;
    line-height: 1.4;
}

/* ==========================================================================
   CALL TO ACTION BANNER
   ========================================================================== */
.cta-banner {
    background-color: var(--light-bg);
    border-top: 1px solid var(--border-color);
    padding: 60px 0;
    text-align: center;
}

.cta-banner h2 {
    font-size: 32px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.cta-banner p {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.cta-buttons .btn-dark svg {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-section {
    background-color: var(--dark-bg);
    color: var(--white);
    padding: 80px 0;
}

.contact-container {
    display: flex;
    gap: 50px;
    align-items: flex-start;
}

.contact-info {
    flex: 1;
}

.contact-logo {
    max-width: 200px;
    margin-bottom: 25px;
}

.contact-description {
    color: #94a3b8;
    line-height: 1.8;
    margin-bottom: 30px;
    font-size: 15px;
}

.contact-info h2 {
    color: var(--primary);
    font-size: 24px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.contact-details p {
    margin-bottom: 15px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.contact-details a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.contact-details span {
    color: var(--primary);
    font-size: 18px;
}

.contact-form-wrapper {
    flex: 1.2;
    background-color: var(--dark-card);
    padding: 40px;
    border-radius: 6px;
    box-shadow: var(--shadow-lg);
    border: 1px solid #2e2e2e;
}

.contact-form-wrapper h2 {
    color: var(--white);
    font-size: 24px;
    margin-bottom: 25px;
    text-transform: uppercase;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #334155;
    background-color: #1e293b;
    color: var(--white);
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    background-color: #0f172a;
}

.contact-form button {
    border: none;
    width: 100%;
    font-size: 16px;
    padding: 14px;
    text-transform: uppercase;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.main-footer {
    background-color: #080808;
    color: #64748b;
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid #1e293b;
    font-size: 14px;
}

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

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 9999;
}

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

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   SUB-PAGE SPECIFIC STYLES (What We Do / Service Areas)
   ========================================================================== */

/* Subpage Hero */
.subpage-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url("images/worker-placeholder.jpg");
    background-size: cover;
    background-position: center;
    padding: 100px 0 60px 0;
    color: var(--white);
    text-align: center;
}

.subpage-hero h1 {
    font-size: 40px;
    color: var(--white);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.subpage-hero p {
    font-size: 16px;
    color: #cbd5e1;
}

/* Detailed Services Rows (What We Do) */
.detailed-services {
    padding: 80px 0;
}

.content-row {
    display: flex;
    align-items: center;
    gap: 60px;
    margin-bottom: 80px;
}

.content-row:last-child {
    margin-bottom: 0;
}

.content-row.reverse {
    flex-direction: row-reverse;
}

.content-text {
    flex: 1.2;
}

.content-text h2 {
    font-size: 28px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.content-text h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--primary);
    margin-top: 10px;
}

.content-text p {
    color: #475569;
    margin-bottom: 20px;
}

.content-image {
    flex: 0.8;
}

.content-image img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: var(--shadow-lg);
}

/* Process Grid inside What We Do page */
.process-section {
    padding: 60px 0;
    background-color: var(--light-bg);
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.process-card {
    background-color: var(--white);
    padding: 30px 20px;
    border-radius: 6px;
    border-top: 4px solid var(--primary);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.process-card h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--dark-bg);
}

.process-card p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 0;
    line-height: 1.5;
}

/* Area Map and Service Cards */
.area-map-container {
    text-align: center;
    margin-bottom: 50px;
}

.area-map-container img {
    max-width: 600px;
    margin: 0 auto;
    border-radius: 6px;
    box-shadow: var(--shadow-md);
}

.area-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.area-card {
    background-color: var(--white);
    padding: 30px 20px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
}

.area-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.area-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.area-card p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
    min-height: 60px;
}

.area-card .btn-orange {
    padding: 8px 16px;
    font-size: 13px;
}

/* ==========================================================================
   MEDIA QUERIES (Responsive Design)
   ========================================================================== */

/* Large Tablets / Small Laptops */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .why-choose-us {
        flex-direction: column;
    }
    
    .why-left, .why-right {
        padding: 50px 40px;
    }
    
    .area-grid, .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small Tablets / Large Mobile */
@media (max-width: 900px) {
    .main-header {
        padding: 15px 0;
    }
    
    .hamburger {
        display: block;
    }
    
    .header-phone-btn {
        display: none;
    }
    
    .main-nav {
        position: absolute;
        top: 68px;
        left: 0;
        width: 100%;
        background-color: var(--dark-bg);
        padding: 20px;
        display: none;
        box-shadow: 0 10px 15px rgba(0,0,0,0.3);
        border-top: 1px solid #1e293b;
    }
    
    .main-nav.active {
        display: block;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .nav-menu a {
        display: block;
        padding: 10px 0;
    }
    
    .hero {
        min-height: 60vh;
        text-align: center;
    }
    
    .hero-content {
        text-align: center;
        margin: 0 auto;
    }
    
    .hero h1 {
        font-size: 34px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .contact-container {
        flex-direction: column;
        gap: 40px;
    }
    
    .contact-info, .contact-form-wrapper {
        width: 100%;
    }
    
    .content-row, .content-row.reverse {
        flex-direction: column;
        gap: 30px;
    }
    
    .content-image img {
        height: auto;
        max-height: 300px;
    }
}

/* Mobile Devices */
@media (max-width: 600px) {
    body {
        font-size: 15px;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .hero p {
        font-size: 15px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .services-section .section-title,
    .projects-section .section-title,
    .why-left h2,
    .cta-banner h2 {
        font-size: 26px;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* Force 2x2 grid on mobile as in mockup */
        gap: 12px;
    }
    
    .service-card {
        padding: 20px 10px;
    }
    
    .s-icon {
        margin-bottom: 12px;
        height: 45px;
    }
    
    .s-icon img {
        height: 36px;
    }
    
    .service-card h3 {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .service-card p {
        font-size: 12px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr; /* Stack projects vertically on small screens */
    }
    
    .why-right {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .contact-form-wrapper {
        padding: 20px;
    }
    
    .area-grid, .process-grid {
        grid-template-columns: 1fr;
    }
}