/*
Theme Name: RHF
Author: Allegra Halton
Description: Custom WP theme for RHF
Version: 1.0
*/

:root {
    --bg-color: #F4F3F0;    /* Soft stone background */
    --text-color: #3a3a3a;  /* Soft Black for text */
    --accent: #A39171;      /* Warm Taupe for buttons/accents */
    --accent-dark: #8E7D5E; /* Darker Taupe for hover states */
    --accent-light: #c7b79c;   
    --muted: #6D685B;       /* Muted Brown for subheaders */
    --white: #ffffff;
    --black: #222;
    --border: #E0DDD5;      /* Stone Grey for borders/dividers */
    --font-header: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
}

body {
    margin: 0;
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
}

h1, h2, h3 {
    font-family: var(--font-header);
    color: var(--text-color);
}

a.link {
    text-decoration: none !important;
    color: var(--text-color)
}

a.link:hover {
    color: var(--muted) 
}

/* ================ Header ================ */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: var(--white);
    border-bottom: 1px solid #eee;
}

.logo-link {
    text-decoration: none;
    display: inline-block;
    line-height: 0; 
}

.logo-svg {
    width: 250px;
    height: auto;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.logo-svg:hover {
    color: var(--black);
}

.logo-svg svg {
    width: 100%;
    height: 100%;
    display: block;
}

.logo-svg svg path, 
.logo-svg svg circle, 
.logo-svg svg rect, 
.logo-svg svg polygon {
    fill: currentColor !important;
}
/* ================ Navbar ================ */
.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links li {
    position: relative;
    display: inline-block;
    color: var(--text-color);
}

.nav-links ul.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 200px;
    list-style: none;
    padding: 15px 0;
    margin: 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-top: 3px solid var(--accent);
    
    /* Animation: Fade and slight slide up */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.nav-links a {
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 1.5px;
    color: var(--text-color);
    font-weight: 600;
    transition: 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links li:hover > ul.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-links ul.sub-menu li {
    display: block;
    width: 100%;
}

.nav-links ul.sub-menu li a {
    padding: 12px 25px;
    display: block;
    font-size: 1.0rem;
    color: var(--muted);
    letter-spacing: 1px;
    white-space: nowrap;
    transition: background 0.2s;
    text-transform: uppercase;
}

.nav-links ul.sub-menu li a:hover {
    background-color: var(--bg-color);
    color: var(--accent);
}

.menu-item-has-children > a::after {
    content: '▾';
    font-size: 1.1rem;
    line-height: 1.1;
    margin-left: 5px;
    vertical-align: middle;
    opacity: 0.6;
}

/* ================ Hero Slider ================ */
.hero-slider {
    position: relative;
    height: 600px;
    overflow: hidden;

}

.slide { 
    position: absolute; width: 100%; height: 100%; 
    background-size: cover; background-position: center; 
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.8s ease-in-out;
}
.slide.active { opacity: 1; }
.hero-content { text-align: center; color: white; }
.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 10px;
    color: var(--white);
    padding-bottom: 50px;
    text-shadow: 0 5px 20px rgba(0,0,0,1);
}

.slider-btn { 
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2); 
    border: none; 
    padding: 15px;
    cursor: pointer; 
    color: white; 
    font-size: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,1);
}
.next { right: 20px; }
.prev { left: 20px; }

/* ================ Intro Section Styling ================ */
.intro-section {
    text-align: center;
    padding: 60px 10%;
}
.intro-section p { 
    max-width: 700px; 
    margin: 0 auto; 
    line-height: 1.8; 
    color: var(--muted);
}

/* ================ services Grid Styling ================ */
.services-grid {
    display: flex;
    gap: 30px;
    padding: 0 10% 80px;
}
.service-box {
    flex: 1;
    background: var(--white);
    padding: 40px;
    text-align: center;
    border: 1px solid var(--border);
    transition: 0.3s;
}
.service-box:hover { border-color: var(--accent); transform: translateY(-5px); }
.service-box .icon { font-size: 2.5rem; margin-bottom: 15px; }

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    color: var(--accent); 
    transition: transform 0.3s ease;
    display: block;
}

.service-box:hover .service-icon {
    transform: scale(1.1);
    color: var(--accent-dark); 
}

.services-grid {
    display: flex;
    gap: 30px;
    padding: 0 10% 80px;
    justify-content: center;
}

.service-box h3 {
    font-family: var(--font-body) !important; 
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px; 
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 15px;
}

.subheader {
    font-family: var(--font-body);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 1.0rem;
    color: var(--accent-light);
    text-shadow: 0 3px 12px rgba(0,0,0,1);
}

.email-link {
    text-decoration: none;
    font-weight: 700;
    color: var(--text-color);
}

.email-link:hover {
    color: var(--muted); 
}

.temp-text {
    color: var(--border);
    font-size: 1.1rem;
    margin-top: 25px;
    letter-spacing: 1px;
}

/* ================ Payment Link in Header ================ */
.payment-trigger {
    font-family: var(--font-body);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    text-decoration: none;
    border: 1px solid var(--accent);
    padding: 5px 12px;
    border-radius: 3px;
    transition: all 0.3s;
}

.payment-trigger:hover {
    background: var(--accent);
    color: var(--white);
}

/* ================ Modal Logic ================ */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(26, 26, 26, 0.9); /* Soft Black with transparency */
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-overlay:target { display: flex; } /* Shows when link is clicked */

.modal-content {
    background: var(--white);
    padding: 50px;
    max-width: 500px;
    width: 90%;
    position: relative;
    text-align: center;
    border-top: 5px solid var(--accent);
}

.instruction-box {
    text-align: left;
    background: var(--bg-color); /* Stone Grey */
    padding: 20px;
    margin: 20px 0;
    border: 1px solid var(--border);
}

.payment-email {
    display: block;
    font-weight: 700;
    color: var(--accent);
    font-size: 1.1rem;
    margin-top: 5px;
}

.close-modal {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 2rem;
    text-decoration: none;
    color: var(--muted);
}

/* ================ Gallery Page Styling ================ */
.gallery-container {
    padding: 50px 5%; text-align: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px; margin-top: 30px;
}
.gallery-grid img { 
    width: 100%; height: 250px; object-fit: cover; 
    cursor: pointer; transition: transform 0.3s; 
}

.gallery-grid img:hover {
    transform: scale(1.03);
}

.gallery-wrapper {
    padding: 80px 10%;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-intro { text-align: center; margin-bottom: 50px; }
.gallery-intro h1 { font-size: 3rem; color: var(--text-color); }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-auto-rows: 200px; 
    grid-auto-flow: dense; 
    gap: 15px;
}

.gallery-item {
    overflow: hidden;
    position: relative;
    border-radius: 4px; /* Slight roundness for modern look */
}

/* Make every 3rd image taller for visual interest */
.gallery-item:nth-child(3n) { grid-row: span 2; }
/* Make every 5th image wider */
.gallery-item:nth-child(5n) { grid-column: span 2; }

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    cursor: pointer;
}

.gallery-item img:hover {
    transform: scale(1.08);
    filter: brightness(90%);
}

/* Responsive fix for the wider items on mobile */
@media (max-width: 768px) {
    .gallery-item:nth-child(5n) { grid-column: span 1; }
    .gallery-grid { grid-auto-rows: 250px; }
}

/* ================ Lightbox ================ */
.lightbox {
    display: none; position: fixed; z-index: 1000; left: 0; top: 0;
    width: 100%; height: 100%; background: rgba(0,0,0,0.9);
    justify-content: center; align-items: center;
}
.lightbox-content { max-width: 80%; max-height: 80%; }
.close { position: absolute; top: 20px; right: 30px; color: white; font-size: 40px; cursor: pointer; }

/* ================ Contact Page Styling ================ */
.contact-wrapper {
    padding: 100px 5%;
    background-color: var(--bg-color);
}

.contact-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

.contact-info, .contact-form-box {
    flex: 1;
}

.info-item {
    margin-bottom: 25px;
}

.info-item strong {
    display: block;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: var(--accent);
    margin-bottom: 5px;
}

.map-container {
    margin-top: 30px;
    border: 1px solid #ddd;
    filter: grayscale(100%);
    transition: 0.5s;
}
.map-container:hover { filter: grayscale(0%); }

/* ================ Form Styling ================ */
.contact-form-box {
    background: #fff;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.quote-form .form-group {
    margin-bottom: 15px;
}

.quote-form input, .quote-form select, .quote-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e0e0;
    font-family: 'Montserrat', sans-serif;
    background: #fdfdfd;
    box-sizing: border-box;
}

.submit-btn {
    background-color: var(--accent);
    color: var(--white);
    border: none;
    padding: 18px;
    font-size: 1rem;
    letter-spacing: 1.5px;
    box-shadow: 0 4px 15px rgba(163, 145, 113, 0.2);
    transition: all 0.3s ease;
    font-family: var(--font-body);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none !important;
}

.submit-btn:hover {
    background-color: var(--accent-dark);
    transform: translateY(-2px); 
    box-shadow: 0 6px 20px rgba(163, 145, 113, 0.3);
}

.email-btn {
    background-color: var(--accent);
    color: var(--white);
    border: none;
    padding: 18px;
    margin-top: 40px;
    font-size: 1rem;
    letter-spacing: 1.5px;
    transition: all 0.3s ease;
    font-family: var(--font-body);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none !important;
}

.email-btn:hover {
    background-color: var(--accent-dark);
    transform: translateY(-2px); 
}

/* ================ Footer Styling ================ */
footer {
    text-align: center;
    padding: 40px;
    background: #eee;
}

.main-footer {
    background: var(--text-color);
    color: var(--white);
    padding: 80px 10% 20px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}
.footer-col h4 {
    color: var(--accent);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
    margin-bottom: 20px;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 10px; font-size: 0.9rem; opacity: 0.8; }
.footer-col a { color: var(--white); text-decoration: none; display: block; margin-bottom: 10px; opacity: 0.8; }
.footer-col a:hover { opacity: 1; color: var(--accent); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.5;
}

/* ================ Responsive ================ */
@media (max-width: 850px) {
    .contact-container { flex-direction: column; }
    .contact-wrapper { padding: 50px 5%; }
}