/*
Theme Name: Junior Flooring
Theme URI: http://localhost
Author: Junior Flooring
Author URI: http://localhost
Description: A custom WordPress theme for Junior Flooring.
Version: 1.0.0
Text Domain: jrflooring
*/
:root {
    --primary: #000000;
    --accent: #2c2c2c;
    --dark-gray: #1a1a1a;
    --medium-gray: #4a4a4a;
    --light-gray: #a0a0a0;
    --off-white: #f8f8f8;
    --white: #ffffff;
    --black: #000000;
    --text: #1a1a1a;
    --text-muted: #666666;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --header-gradient: linear-gradient(135deg, #000000 0%, #434343 100%);
    --white-gradient: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 5rem 0;
}

.bg-light {
    background-color: var(--light);
}

.text-center {
    text-align: center;
}

.accent {
    color: var(--primary);
    font-weight: 700;
}

/* Typography */
h1, h2, h3 {
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: var(--header-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: table; /* fallback for background-clip */
    width: fit-content;
}

h1 {
    font-size: 4rem;
    font-weight: 700;
}

h2 {
    font-size: 2.8rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 1.5rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 3px;
    background: var(--header-gradient);
}

.text-center h2 {
    margin-left: auto;
    margin-right: auto;
}

.text-center h2::after {
    left: 50%;
    transform: translateX(-50%);
}

p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 300;
}

.lead {
    font-size: 1.25rem;
    font-weight: 400;
    max-width: 700px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-small {
    padding: 0.6rem 1.2rem;
    font-size: 0.8rem;
}

.btn-primary {
    background: var(--black);
    color: var(--white);
    border: 2px solid var(--black);
    font-weight: 700;
}

.btn-primary:hover {
    background: transparent;
    color: var(--black);
}

.btn-outline {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--dark);
}

.btn-full {
    width: 100%;
    text-align: center;
}

/* Header & Nav */
header {
    background-color: var(--white);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    padding: 1rem 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    height: 80px;
    width: auto;
    display: block;
}

.logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
}

.nav-links a:not(.btn) {
    text-decoration: none;
    color: var(--charcoal);
    font-weight: 400;
    transition: var(--transition);
}

.nav-links a:not(.btn):hover {
    color: var(--primary);
}

/* Hero Section */
.hero-section {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    color: var(--white);
    padding-top: 80px;
    overflow: hidden;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.hero-slider .slide.active {
    opacity: 1;
}

.hero-section {
    position: relative;
    height: 100vh;
    min-height: 700px;
    background: url('luxury_house_pool_flooring_1774627035765.png') no-repeat center center/cover;
    display: flex;
    align-items: center;
    color: var(--white);
    padding-top: 80px; 
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.3));
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: left;
    width: 100%; /* Required so container max-width + auto margins align with nav and sections */
}

.hero-content h1 {
    background: var(--white-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
    max-width: 800px;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
    margin-top: 3rem;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Image Collage Section */
.collage-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 220px);
    gap: 1.5rem;
}

.collage-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.collage-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.collage-item:hover img {
    transform: scale(1.08);
}

.collage-item-1 { grid-row: span 2; }
/* Collage Item 2 and 3 will automatically fill the right side rows */

.section-intro-bw {
    border-left: 4px solid var(--black);
    padding-left: 2rem;
    margin-bottom: 3rem;
}

.bg-dark-gradient {
    background: linear-gradient(180deg, #1a1a1a 0%, #000000 100%);
    color: var(--white);
}

.bg-dark-gradient h2,
.faq-contact-section > .container > div:first-child h2, /* Targets FAQ h2 only */
.bg-dark-gradient .why-item h3 {
    background: var(--white-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bg-dark-gradient h2::after,
.faq-contact-section > .container > div:first-child h2::after {
    background: var(--white-gradient);
}

.accordion-header {
    width: 100%;
    padding: 1.5rem 0;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white); /* White for dark section visibility */
    cursor: pointer;
    text-align: left;
}

.bg-light-gradient {
    background: linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%);
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.service-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.service-card:hover .service-image img {
    transform: scale(1.1);
}

.service-content {
    padding: 2rem;
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

/* Why Section */
.why-section {
    background-color: var(--charcoal);
    color: var(--white);
    padding: 8rem 0;
}

.why-icon {
    width: 48px;
    height: 48px;
    color: var(--light-gray);
    margin-bottom: 2rem;
}

.why-icon svg {
    width: 100%;
    height: 100%;
}

.why-item h3 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.why-item p {
    color: rgba(255, 255, 255, 0.7);
}

/* Masonry Gallery */
.masonry-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-auto-rows: 250px;
    grid-auto-flow: dense;
    gap: 1rem;
    margin-top: 3rem;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.masonry-gallery.collapsed {
    max-height: 800px; /* Approximately 3 rows */
}

.gallery-item {
    overflow: hidden;
    border-radius: 4px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item.tall {
    grid-row: span 2;
}

.gallery-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

/* FAQ & Contact Section with Background */
.faq-contact-section {
    position: relative;
    background: url('assets/portfolio_5.jpeg') no-repeat center center/cover;
    background-attachment: fixed;
    color: var(--white);
    padding: 8rem 0;
}

.section-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85); /* Deep black overlay */
    z-index: 1;
}

.faq-contact-section .container {
    position: relative;
    z-index: 2;
}

.faq-contact-section .section-title {
    color: var(--white);
}

.faq-contact-section .accordion-header {
    color: var(--white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.faq-contact-section .accordion-content p {
    color: rgba(255, 255, 255, 0.8);
}

.mt-3 {
    margin-top: 3rem;
}
.accordion {
    margin-top: 2rem;
}

.accordion-item {
    border-bottom: 1px solid #ddd;
}

/* Accordion already styled above */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-content p {
    padding-bottom: 1.5rem;
    color: var(--text-muted);
}

.accordion-item.active .accordion-content {
    max-height: 200px;
}

.accordion-item.active .accordion-header span {
    transform: rotate(45deg);
}

.accordion-header span {
    font-size: 1.5rem;
    transition: var(--transition);
}

/* Contact Form */
.contact-form-container {
    background: var(--white);
    padding: 3rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
    border-radius: 8px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--black);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.direct-contact {
    margin-top: 2rem;
    text-align: center;
}

/* Contact Grid & Info */
.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 5rem;
    align-items: start;
}

.contact-info-container {
    padding: 1rem 0;
}

.info-block {
    margin-bottom: 3rem;
}

.info-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: center;
}

.info-icon {
    width: 50px;
    height: 50px;
    background: var(--off-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--black);
    flex-shrink: 0;
    border: 1px solid #eee;
}

.info-icon svg {
    width: 24px;
    height: 24px;
}

.info-text h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.3rem;
    background: none;
    -webkit-text-fill-color: initial;
    color: var(--black);
}

.info-text p {
    margin-bottom: 0;
    font-size: 1.1rem;
    font-weight: 400;
}

.map-placeholder {
    width: 100%;
    height: 250px;
    background: #1a1a1a;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    border: 1px solid #333;
}

.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.4);
    color: var(--white);
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.whatsapp-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #25D366;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

.whatsapp-link svg {
    width: 24px;
    height: 24px;
}

/* Footer */
.site-footer {
    padding: 1.5rem 0;
    background-color: var(--white);
    color: var(--black);
    font-size: 1rem;
    border-top: 1px solid #eee;
}

.site-footer p {
    margin: 0;
    font-weight: 400;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--black);
    border-radius: 3px;
    transition: var(--transition);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 768px) {
    .mobile-close-container {
        display: flex;
        width: 100%;
        justify-content: flex-end;
        padding: 0.5rem 1.5rem;
        z-index: 2000;
    }

    .mobile-close {
        font-size: 2.2rem;
        font-weight: 200;
        line-height: 1;
        cursor: pointer;
        color: var(--black);
        transition: var(--transition);
    }

    .mobile-close:hover {
        transform: rotate(90deg);
        color: var(--light-gray);
    }
}

/* Scroll Reveal Base */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.19, 1, 0.22, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--black);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 9999;
    transition: var(--transition);
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: var(--dark-gray);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    h1 { font-size: 3.2rem; }
    .grid-2, .grid-3, .grid-4, .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    h1 { font-size: 2.8rem; }
    h2 { font-size: 2.2rem; }
    
    section { padding: 4rem 0; }
    
    .collage-container {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
        gap: 1rem;
    }
    
    .collage-item-1 { grid-column: span 2; height: 280px; }
    .collage-item { height: 180px; }
    
    .masonry-gallery {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 150px;
        gap: 0.5rem;
    }

    .gallery-item.large, .gallery-item.tall {
        grid-column: span 1;
        grid-row: span 1;
    }

    .gallery-item:nth-child(4n+1) {
        grid-column: span 2;
        grid-row: span 2;
    }

    .about-content {
        flex-direction: column;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
    }
    
    .btn { width: 100%; text-align: center; }
    
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        padding-top: 0.5rem;
        overflow-y: auto;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 0.4rem 0;
        width: 80%;
        text-align: center;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        padding-bottom: 0.5rem;
    }

    .nav-links li:last-child { border: none; margin-top: 0.8rem; }

    .nav-links a {
        font-size: 1.3rem;
        font-weight: 400;
        text-transform: uppercase;
        letter-spacing: 3px;
        color: var(--black);
    }

    .nav-links a.btn-primary {
        color: var(--white);
        -webkit-text-fill-color: var(--white);
    }

    .hero-section {
        padding-top: 150px;
        min-height: 100vh;
        display: flex;
        align-items: center;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2.2rem;
        margin-bottom: 2rem;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }
    
    .btn { width: 100%; text-align: center; }
}
