/* --- RESET & VARIABLES --- */
:root {
    --primary-orange: #ff6600;
    --dark-orange: #d9530b;
    --dark-bg: #111116;
    --text-color: #333;
    --light-text: #ccc;
    --font-heading: 'Barlow Semi Condensed', sans-serif;
    --font-body: 'Epilogue', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: #fff;
    overflow-x: hidden;
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); }

/* --- UTILITY --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- TOP BAR --- */
.top-bar {
    background-color: #000;
    color: #fff;
    padding: 12px 0;
    font-size: 0.9rem;
    font-weight: 500;
}
.top-bar .contact-info {
    display: flex;
    justify-content: flex-end;
    gap: 25px;
}
.top-bar i { color: var(--primary-orange); margin-right: 8px; }

/* --- HEADER & NAV --- */
header {
    background-color: var(--primary-orange);
    height: 90px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0;
}
.logo-container {
    background-color: #fff;
    height: 100%;
    padding: 10px 40px;
    display: flex;
    align-items: center;
    clip-path: polygon(0 0, 100% 0, 92% 100%, 0% 100%);
    min-width: 280px;
    transition: 0.3s;
}
.nav-logo { max-height: 50px; transition: 0.3s; }

nav { display: flex; align-items: center; flex: 1; justify-content: flex-end; height: 100%; }
.nav-links { display: flex; gap: 30px; margin-right: 30px; }
.nav-links a { color: #fff; font-weight: 700; text-transform: uppercase; font-size: 1rem; font-family: var(--font-heading); }
.nav-links a:hover { color: #000; }

.quote-btn {
    background-color: var(--dark-orange);
    color: #fff;
    font-weight: 800;
    padding: 0 40px;
    height: 100%;
    display: flex;
    align-items: center;
    text-transform: uppercase;
    font-size: 0.9rem;
}
.quote-btn:hover { background-color: #000; }

.mobile-menu-icon { display: none; color: #fff; font-size: 1.8rem; cursor: pointer; padding-right: 20px; }

/* --- HERO SECTION --- */
.hero {
    position: relative;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://joesuttoncarpentry.ie.lasota.co.uk/wp-content/uploads/2024/05/h1-bg1.webp');
    background-size: cover;
    background-position: center;
    min-height: 700px;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.hero-overlay { display: none; }

.hero-container {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 2;
}

/* HERO CONTENT BLOCK */
.hero-content-block {
    flex: 1;
    color: #ffffff;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-content-block h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 15px;
    color: #ffffff !important;
}

.hero-content-block .subtitle {
    font-size: 1.5rem;
    color: #cccccc !important;
    margin-bottom: 40px;
    border-bottom: 2px solid #555;
    padding-bottom: 20px;
    display: inline-block;
}

/* HERO BUTTON (Split Style) */
.hero-btn {
    padding: 0;
    display: inline-flex;
    align-items: stretch;
    background: transparent;
    border: none;
    text-decoration: none;
    font-family: var(--font-heading);
    margin-top: 10px;
}
.btn-text {
    background-color: var(--primary-orange);
    color: #000;
    padding: 18px 30px;
    font-weight: 800;
    text-transform: uppercase;
    transition: 0.3s;
}
.btn-icon {
    background-color: #000;
    color: #fff;
    padding: 0 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}
.hero-btn:hover .btn-text { background-color: #fff; }
.hero-btn:hover .btn-icon { background-color: var(--primary-orange); color: #000; }

.hero-image-wrapper {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}
.hero-image-wrapper img {
    max-width: 120%;
    width: 900px;
    border-radius: 50% 0 0 50%;
    border: 8px solid rgba(255,255,255,0.05);
    transform: translateX(100px);
}

/* --- FEATURES --- */
.features { padding: 100px 0; background: #fff; }
.features-grid { display: flex; gap: 40px; }
.feature-box { flex: 1; text-align: center; }
.icon-circle {
    width: 90px; height: 90px; background: #f9f9f9; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 25px; font-size: 2rem; color: #333; border: 1px solid #eee;
    transition: 0.3s;
}
.feature-box:hover .icon-circle { background: var(--primary-orange); color: #fff; }
.feature-box h3 { font-size: 1.4rem; font-weight: 800; margin-bottom: 15px; }
.feature-box p { color: #666; font-size: 1rem; line-height: 1.7; }

/* --- ABOUT --- */
.about-services { padding: 100px 0; background: #fff; }
/* This is a GRID container */
.grid-split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 60px; align-items: center; }
.about-left { position: relative; }
.about-left .main-img { width: 100%; border-radius: 10px; display: block; }
.helmet-overlay {
    position: absolute; bottom: -50px; left: -30px; width: 180px;
    animation: float 4s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }

.about-right .section-label {
    font-weight: 800; color: var(--primary-orange); display: flex; align-items: center; gap: 10px; margin-bottom: 15px; text-transform: uppercase;
}
.about-right h2 { font-size: 3rem; font-weight: 800; line-height: 1.1; margin-bottom: 40px; color: #000; }
.inner-content { display: flex; gap: 30px; align-items: flex-start; }
.inset-image { width: 200px; border-radius: 5px; }
.text-content p { margin-bottom: 30px; color: #555; }
.signature-block { display: flex; gap: 20px; align-items: center; }
.sig-img { width: 120px; filter: grayscale(100%); }
.signature-block h4 { font-weight: 800; font-size: 1.2rem; line-height: 1.2; }
.signature-block span { font-weight: 400; color: #777; font-size: 0.9rem; }

/* --- COMMITMENT TABS --- */
.commitment-section {
    background: linear-gradient(to bottom, #151515 80%, #fff 80%);
    color: #fff; padding: 100px 0; position: relative;
}
.commitment-header { display: flex; gap: 50px; margin-bottom: 60px; }
.header-left { flex: 1; }
.header-right { flex: 1; padding-top: 40px; }
.header-right p { color: #ccc; }
.commitment-header h2 { font-size: 3.5rem; font-weight: 800; line-height: 1.1; }
.orange-dot { width: 10px; height: 10px; background: var(--primary-orange); border-radius: 50%; display: inline-block; margin-right: 10px; }
.label { color: var(--primary-orange); font-weight: 700; margin-bottom: 15px; }

.commitment-content { display: flex; gap: 50px; align-items: flex-start; }
.image-display-area { flex: 1.2; }
#service-display-img {
    width: 100%; height: 500px; object-fit: cover; border-radius: 5px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4); transition: opacity 0.3s ease;
}
.services-list { flex: 0.8; }
.services-list ul { display: flex; flex-direction: column; gap: 15px; }
.tab-link {
    font-size: 1.2rem; font-weight: 600; cursor: pointer; padding: 10px 0;
    color: #888; transition: 0.3s; display: flex; align-items: center; gap: 15px;
    font-family: var(--font-heading);
}
.tab-link i { font-size: 0.6rem; opacity: 0; color: var(--primary-orange); }
.tab-link.active, .tab-link:hover { color: #fff; }
.tab-link.active i { opacity: 1; }

/* --- CONTRACTING CARDS --- */
.principal-contracting { padding: 100px 0; background: #fff; text-align: center; }
.principal-header { max-width: 800px; margin: 0 auto 60px; }
.header-icon-circle {
    width: 60px; height: 60px; background: #000; color: #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 1.5rem;
}
.principal-header h2 { font-size: 3rem; margin-bottom: 20px; font-weight: 800; }
/* This is a GRID container */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

.contract-card {
    position: relative; height: 500px; overflow: hidden; cursor: pointer; background: #000;
}
.card-bg { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; opacity: 0.7; }
.card-bottom-bar {
    position: absolute; bottom: 20px; left: 20px; right: 20px;
    background: var(--primary-orange); color: #000; padding: 15px;
    font-weight: 800; text-transform: uppercase; font-family: var(--font-heading);
    display: flex; align-items: center; gap: 10px; transition: 0.3s;
}
.card-hover-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.95), rgba(0,0,0,0.6));
    color: #fff; padding: 40px; text-align: left;
    display: flex; flex-direction: column; justify-content: center;
    opacity: 0; visibility: hidden; transition: 0.4s;
}
.card-hover-overlay h3 { font-size: 2rem; line-height: 1; margin-bottom: 20px; transform: translateY(20px); transition: 0.4s; }
.card-hover-overlay p { font-size: 0.95rem; color: #ddd; transform: translateY(20px); transition: 0.4s 0.1s; }
.arrow-circle {
    width: 50px; height: 50px; background: var(--primary-orange); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: #000;
    margin-top: 20px; transform: translateY(20px); transition: 0.4s 0.2s;
}

.contract-card:hover .card-bg { transform: scale(1.1); opacity: 0.4; }
.contract-card:hover .card-bottom-bar { opacity: 0; transform: translateY(20px); }
.contract-card:hover .card-hover-overlay { opacity: 1; visibility: visible; }
.contract-card:hover .card-hover-overlay h3,
.contract-card:hover .card-hover-overlay p,
.contract-card:hover .card-hover-overlay .arrow-circle { transform: translateY(0); }

/* --- GALLERY --- */
.gallery-section { padding: 100px 0; background: #fff; }
.gallery-wrapper { display: flex; gap: 60px; align-items: center; }
.gallery-text { flex: 1; }
.gallery-text h2 { font-size: 3.5rem; font-weight: 800; line-height: 1.1; margin-bottom: 20px; }
/* This is a GRID container */
.gallery-grid { flex: 1.5; display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.gallery-item { height: 150px; overflow: hidden; border-radius: 8px; cursor: pointer; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: 0.3s; }
.gallery-item:hover img { transform: scale(1.1); }

/* Lightbox */
.lightbox {
    display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95); justify-content: center; align-items: center;
}
.lightbox img { max-width: 90%; max-height: 90%; border-radius: 5px; }
.close-btn { position: absolute; top: 20px; right: 30px; color: #fff; font-size: 40px; cursor: pointer; }

/* --- FOOTER --- */
footer { background: var(--dark-bg); color: #fff; padding: 80px 0 30px; position: relative; }
.footer-content { display: flex; flex-direction: column; gap: 40px; }
.footer-socials { display: flex; gap: 20px; }
.footer-socials a {
    width: 40px; height: 40px; background: rgba(255,255,255,0.1); display: flex;
    align-items: center; justify-content: center; border-radius: 50%; color: #fff;
}
.footer-socials a:hover { background: var(--primary-orange); }

.footer-contact h3 { font-size: 1.5rem; margin-bottom: 20px; font-weight: 700; }
.footer-contact ul { display: flex; flex-direction: column; gap: 15px; }
.footer-contact li { display: flex; gap: 15px; align-items: center; }
.icon-box { color: var(--primary-orange); width: 20px; text-align: center; }

.footer-divider { border: 0; border-top: 1px solid #333; margin: 30px 0; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-logo img { max-width: 200px; filter: brightness(0) invert(1); }
.copyright { color: #888; font-size: 0.9rem; }

.back-to-top {
    position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px;
    background: #fff; color: #000; border-radius: 50%; display: flex;
    align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 900;
}
.back-to-top:hover { background: var(--primary-orange); color: #fff; }

/* --- FUN HELMET ANIMATION --- */
.helmet-overlay {
    cursor: pointer; /* Shows it's clickable */
    transition: transform 0.3s;
}

/* The Fun Class (Added by JS) */
.helmet-overlay.fun-mode {
    animation: spinJump 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes spinJump {
    0% { transform: translateY(0) rotate(0deg); }
    40% { transform: translateY(-150px) rotate(180deg) scale(1.2); }
    100% { transform: translateY(0) rotate(360deg) scale(1); }
}

/* --- MOBILE RESPONSIVE LAYOUT (Strict Fixes) --- */
.mobile-menu-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: #000; z-index: 3000; display: none; flex-direction: column;
    align-items: center; justify-content: center;
}
.close-menu { position: absolute; top: 20px; right: 30px; color: #fff; font-size: 3rem; cursor: pointer; }
.mobile-links { text-align: center; }
.mobile-links li { margin: 20px 0; }
.mobile-links a { font-size: 2rem; font-weight: 800; color: #fff; text-transform: uppercase; }

@media (max-width: 900px) {
    /* 1. Hide Desktop Navigation Elements */
    .top-bar { display: none !important; }
    .nav-links, .quote-btn { display: none !important; }
    .mobile-menu-icon { display: block !important; }
    
    /* 2. Fix Logo (White on Mobile) */
    .logo-container { clip-path: none; background: transparent; padding: 10px; min-width: auto; }
    .nav-logo { max-height: 40px; filter: brightness(0) invert(1); }
    
    /* 3. HERO LAYOUT FIXES (Centered) */
    .hero { 
        min-height: auto; 
        flex-direction: column; 
        padding-top: 0;
        background-position: top center;
    }
    .hero-container { 
        flex-direction: column; 
        padding: 0 20px;
    }
    
    /* Force Centering of Hero Content */
    .hero-content-block { 
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center; /* Centers the Button and Subtitle Box */
        text-align: center;  /* Centers the Text inside */
        padding: 40px 10px 30px 10px;
    }
    
    /* Adjust Font Sizes & Colors for Mobile */
    .hero-content-block h1 { 
        font-size: 3.2rem; 
        line-height: 1.1;
        color: #ffffff !important;
        width: 100%;
        margin-bottom: 15px;
    }
    
    .hero-content-block .subtitle {
        font-size: 1.2rem;
        color: #cccccc !important;
        border-bottom: 1px solid #777; 
        margin-bottom: 30px;
        display: inline-block;
        padding-bottom: 15px;
    }

    /* Ensure Button is Centered */
    .hero-btn {
        margin-top: 5px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Fix Image Alignment */
    .hero-image-wrapper { 
        justify-content: center; 
        margin-top: 20px;
    }
    .hero-image-wrapper img { 
        border-radius: 0; 
        width: 100%; 
        max-width: 400px; 
        transform: none; 
        border: none; 
    }
    
    /* 4. STACK GRID LAYOUTS (About, Projects, Gallery) */
    .grid-split, .cards-grid {
        display: flex; /* Switch from Grid to Flex for easier stacking */
        flex-direction: column;
        gap: 40px;
    }

    /* 5. STACK FLEX LAYOUTS (Features, Footer) */
    .features-grid, .commitment-header, .gallery-wrapper, .footer-bottom { 
        flex-direction: column; 
    }
    
    /* Fix About Section Internal Content */
    .inner-content { flex-direction: column; }
    .inset-image { width: 100%; height: 250px; object-fit: cover; margin-bottom: 20px; }
    
    /* Fix Footer & Other Layouts */
    .commitment-content { flex-direction: column-reverse; }
    .services-list, .image-display-area { width: 100%; }
    #service-display-img { height: 250px; }
    .commitment-section { background: #151515; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); width: 100%; gap: 10px; }
    .footer-bottom { text-align: center; gap: 20px; }
}

/* --- VIDEO REVIEW SECTION --- */
.video-review-section {
    padding: 80px 0;
    background-color: var(--light-bg);
}

.review-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.review-text {
    flex: 1;
}

.review-text .section-label {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 1px;
    font-family: var(--font-head);
}

.review-text h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    line-height: 1.2;
    font-family: var(--font-head);
}

.review-text p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text);
    line-height: 1.6;
}

.review-text .stars {
    color: #FFD700; /* Gold stars */
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.reviewer-name {
    font-weight: 700;
    font-style: italic;
    color: var(--dark) !important;
}

.review-video-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* --- CSS PHONE MOCKUP --- */
.phone-mockup {
    width: 300px;
    height: 600px;
    border: 14px solid #111; /* The phone casing */
    border-radius: 40px; /* Rounded phone corners */
    position: relative;
    background-color: #000;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15); /* Drop shadow */
    overflow: hidden;
}

/* The camera notch at the top */
.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 25px;
    background-color: #111;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    z-index: 2;
}

.phone-mockup video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures video fills the screen */
    border-radius: 26px; /* Inner curve of the screen */
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 900px) {
    .review-container {
        flex-direction: column;
        text-align: center;
    }
    
    .review-text h2 {
        font-size: 2.2rem;
    }
    
    .phone-mockup {
        width: 280px;
        height: 560px;
    }
}