/*
Theme Name: Rommaivilla4
Theme URI: http://rommaivilla.com/
Author: Antigravity
Author URI: https://github.com/google-deepmind
Description: WordPress theme for Rommai Villa (Version 4 - English Only, no Slow Living, secure Contact Email Submission, fixed typography alignment).
Version: 1.0.0
Text Domain: rommaivilla4
*/

/* --- DESIGN TOKENS --- */
:root {
    --c-cream: #F4F1EB;      
    --c-brown: #3A322D;      
    --c-green: #596C56;      
    --c-light-brown: #A09388;
    --c-dark-overlay: #433D38; 
    
    --f-serif: 'Playfair Display', serif;
    --f-sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

html { scroll-behavior: smooth; }
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--f-sans);
    background-color: var(--c-cream);
    color: var(--c-brown);
    line-height: 1.7;
    overflow-x: hidden;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
}

h1, h2, h3, h4 { font-family: var(--f-serif); font-weight: 400; }

section { position: relative; padding: 120px 8%; scroll-margin-top: 60px; }

/* --- SCROLL REVEAL ANIMATION --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- EDITORIAL TYPOGRAPHY --- */
.accent-line { width: 60px; height: 3px; background-color: var(--c-green); margin: 0 auto 30px auto; }
.text-left .accent-line { margin-left: 0; }

.vertical-text {
    position: absolute; top: 150px; left: 3%; writing-mode: vertical-rl; transform: rotate(180deg);
    font-family: var(--f-sans); font-size: 0.65rem; letter-spacing: 5px; color: #C5C0BA; text-transform: uppercase;
}

/* --- NAVIGATION --- */
header {
    position: fixed; top: 0; left: 0; width: 100%; padding: 30px 6%;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 1000; transition: all 0.4s ease; border-bottom: 1px solid transparent;
}
.header-scrolled {
    background-color: rgba(244, 241, 235, 0.98); padding: 15px 6%;
    border-bottom: 1px solid rgba(58, 50, 45, 0.1); box-shadow: 0 5px 15px rgba(0,0,0,0.03);
}

.logo { font-family: var(--f-serif); font-size: 1.5rem; color: #FFF; text-decoration: none; letter-spacing: 2px; }
.header-scrolled .logo { color: var(--c-brown); }

.nav-right { display: flex; align-items: center; gap: 30px; }
.nav-links { display: flex; list-style: none; gap: 30px; align-items: center; }
.nav-links a { color: #FFF; text-decoration: none; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 2px; transition: color 0.3s; }
.header-scrolled .nav-links a { color: var(--c-brown); }
.nav-links a:hover { color: var(--c-green); }

.btn-book-nav { font-size: 0.85rem; background-color: var(--c-green); color: #FFF !important; padding: 10px 20px; border: 1px solid var(--c-green); transition: all 0.3s ease; }
.btn-book-nav:hover { background-color: transparent; color: var(--c-green) !important; }

/* --- HAMBURGER MENU --- */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1100;
}
.hamburger .bar {
    width: 100%;
    height: 2px;
    background-color: #FFF;
    transition: all 0.3s ease;
}
.header-scrolled .hamburger .bar {
    background-color: var(--c-brown);
}
.hamburger.active .bar {
    background-color: var(--c-brown) !important;
}
.mobile-only {
    display: none;
}

/* --- BUTTONS --- */
.btn-green { background-color: var(--c-green); color: #FFF; border: 1px solid var(--c-green); padding: 14px 40px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 2px; text-decoration: none; transition: all 0.3s ease; cursor: pointer; display: inline-block; }
.btn-green:hover { background-color: transparent; color: var(--c-green); }

/* --- BACK TO TOP BUTTON --- */
.back-to-top {
    position: fixed; bottom: 40px; right: 40px; z-index: 999;
    width: 50px; height: 50px; background-color: var(--c-green); color: #FFF;
    border: none; border-radius: 50%; cursor: pointer; font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15); 
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover { background-color: var(--c-brown); transform: translateY(-5px); }

/* --- 1. HOME (VIDEO BACKGROUND) --- */
#home {
    position: relative; height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center;
    text-align: center; color: #FFF; padding: 0; overflow: hidden; background-color: var(--c-brown);
}
.hero-video { position: absolute; top: 50%; left: 50%; min-width: 100%; min-height: 100%; width: auto; height: auto; transform: translateX(-50%) translateY(-50%); z-index: 1; object-fit: cover; opacity: 0.8; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(rgba(58, 50, 45, 0.4), rgba(58, 50, 45, 0.2)); z-index: 2; }
.hero-content { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; }
.hero-content h1 { font-size: 5rem; letter-spacing: 2px; margin-bottom: 20px; color: #FFF; }
.hero-content p { font-family: var(--f-serif); font-style: italic; font-size: 2rem; letter-spacing: 1px; color: #EAE5DE; }

/* --- 2. WELCOME & STORY --- */
#welcome, #our-story { max-width: 1000px; margin: 0 auto; text-align: left; padding-bottom: 60px; }
.story-content h2 { font-size: 3rem; margin-bottom: 20px; }
.story-content p, #our-story p { font-size: 1.1rem; color: var(--c-light-brown); margin-bottom: 25px; line-height: 1.8; }

.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; margin-top: 60px; }
.collage-wrapper { position: relative; width: 100%; height: 430px; }
.img-main { width: 85%; height: 350px; object-fit: cover; position: absolute; top: 0; right: 0; border-bottom: 6px solid var(--c-green); }
.img-sub { width: 60%; height: 200px; object-fit: cover; position: absolute; bottom: 0; left: 0; border: none; box-shadow: 0 20px 40px rgba(0,0,0,0.1); }

/* --- STYLE FOR NEW STANDARD INSERT IMAGE --- */
.villa-insert-image {
    padding: 40px 8%;
    text-align: center;
    scroll-margin-top: 60px; 
}
.image-container {
    display: inline-block; 
    width: 100%; /* Ensures responsiveness */
    max-width: 1000px;
}
.centered-image {
    width: 100%; 
    height: auto; 
    display: block;
    margin: 0 auto;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); 
}

/* --- 3. VILLAS INTERACTIVE --- */
#villas { max-width: 1400px; margin: 0 auto; padding-top: 60px; }
#villas .section-title { text-align: center; font-size: 3.5rem; margin-bottom: 20px; }

.villas-accordion { display: flex; width: 100%; height: 600px; overflow: hidden; transition: all 0.5s ease; }
.panel { flex: 1; position: relative; background-size: cover; background-position: center; cursor: pointer; transition: flex 0.6s cubic-bezier(0.25, 1, 0.5, 1); border-right: 2px solid var(--c-cream); }
.panel:last-child { border-right: none; }
.panel:hover { flex: 1.5; }
.panel:hover::before { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 5px; background: var(--c-green); z-index: 5; }
.panel::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 40%; background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); }
.panel-title { position: absolute; bottom: 30px; left: 30px; z-index: 2; color: #FFF; font-family: var(--f-sans); font-size: 1.2rem; letter-spacing: 3px; text-transform: uppercase; }

.villa-detail-container { display: none; max-width: 1000px; margin: 0 auto; animation: fadeIn 0.8s ease forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.back-btn { background: none; border: none; color: var(--c-green); font-size: 0.85rem; letter-spacing: 2px; text-transform: uppercase; cursor: pointer; margin-bottom: 30px; display: flex; align-items: center; gap: 8px; font-weight: bold; transition: 0.3s; }
.back-btn:hover { color: var(--c-brown); }

.detail-image-wrapper { position: relative; width: 100%; height: 650px; background-size: cover; background-position: center; margin-bottom: 100px; }
.detail-overlay-box { position: absolute; bottom: -50px; left: 50%; transform: translateX(-50%); background-color: var(--c-dark-overlay); width: 85%; max-width: 550px; padding: 45px; text-align: center; color: #FFF; box-shadow: 0 20px 40px rgba(0,0,0,0.15); border-top: 4px solid var(--c-green); }
.detail-stats { display: flex; justify-content: space-around; margin-bottom: 35px; }
.stat-group .label { display: block; font-size: 0.75rem; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px; color: #B3ADA5; }
.stat-group .value {
    display: block;
    font-family: var(--f-serif);
    font-size: 2.2rem;
    color: #FFF;
    font-variant-numeric: lining-nums;
    -moz-font-feature-settings: "lnum";
    -webkit-font-feature-settings: "lnum";
    font-feature-settings: "lnum";
}
.detail-subtitle { text-align: center; font-size: 0.85rem; letter-spacing: 2px; text-transform: uppercase; color: var(--c-green); margin-top: -30px; padding-bottom: 40px; font-weight: bold; }

/* --- VILLA DETAIL EXTENDED CONTENT --- */
.villa-detail-content { padding: 0 5%; margin-bottom: 80px; }
.villa-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; margin-top: 40px; }
.villa-description h3 { font-size: 2.2rem; margin-bottom: 20px; color: var(--c-brown); }
.villa-description p { color: var(--c-light-brown); margin-bottom: 20px; line-height: 1.8; font-size: 1.05rem; }
.villa-features-list { list-style: none; margin-top: 30px; padding: 0; border-top: 1px solid rgba(160, 147, 136, 0.2); }
.villa-features-list li { padding: 12px 0 12px 25px; position: relative; color: var(--c-brown); border-bottom: 1px solid rgba(160, 147, 136, 0.2); font-size: 0.95rem; }
.villa-features-list li::before { content: '•'; color: var(--c-green); position: absolute; left: 5px; font-size: 1.5rem; line-height: 1; top: 12px; }

/* Gallery Collage Styling */
.villa-gallery { display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 250px; gap: 15px; }
.villa-gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; transition: transform 0.5s ease; }
.villa-gallery img:hover { transform: scale(1.02); }
.villa-gallery .gallery-img-1 { grid-column: 1 / 2; grid-row: 1 / 3; } /* Left long img */
.villa-gallery .gallery-img-2 { grid-column: 2 / 3; grid-row: 1 / 2; } /* Top right */
.villa-gallery .gallery-img-3 { grid-column: 2 / 3; grid-row: 2 / 3; } /* Bottom right */

@media (max-width: 968px) {
    .villa-detail-grid { grid-template-columns: 1fr; gap: 40px; }
    .villa-gallery { grid-auto-rows: 200px; }
}

/* --- PARALLAX BANNER --- */
.parallax-banner {
    background-image: url('http://rommaivilla.com/wp-content/uploads/2026/06/IMG_1963-scaled.jpg');
    background-attachment: fixed; background-size: cover; background-position: center;
    height: 60vh; display: flex; align-items: center; justify-content: center;
    position: relative; margin-top: 60px; padding: 0 8%;
}
.parallax-banner::after { content: ''; position: absolute; top:0; left:0; right:0; bottom:0; background: rgba(58,50,45,0.6); }
.parallax-banner h2 { position: relative; z-index: 2; color: #FFF; font-size: 2.8rem; text-align: center; max-width: 900px; font-style: italic; line-height: 1.3; }

/* --- 5. GUESTBOOK --- */
#guestbook { background-color: #EBE6DF; text-align: center; padding-top: 100px; padding-bottom: 100px; }
#guestbook h2 { font-size: 3.5rem; margin-bottom: 20px; }
#guestbook p.sub { font-style: italic; color: var(--c-green); margin-bottom: 60px; font-family: var(--f-serif); font-size: 1.2rem; }
.review-slider-wrapper {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}
.review-slider-container {
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.review-slider-container::-webkit-scrollbar {
    display: none;
}
.review-grid {
    display: flex;
    width: 100%;
    gap: 0;
    margin: 0;
}

/* Styled review cards with elegant watermark quotes */
.review-card { 
    background: #FFF; padding: 40px 30px; text-align: left; border-top: 4px solid var(--c-green); 
    box-shadow: 0 10px 30px rgba(89, 108, 86, 0.08); transition: transform 0.3s; 
    position: relative; overflow: hidden;
    min-width: 100%;
    box-sizing: border-box;
    scroll-snap-align: start;
}

/* Dots styling */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 35px;
}
.slider-dots .dot {
    width: 10px;
    height: 10px;
    background-color: #D5CEC4;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}
.slider-dots .dot.active {
    background-color: var(--c-green);
}
.review-card::before {
    content: '”';
    position: absolute; top: 15px; right: 25px;
    font-size: 5rem; color: rgba(89, 108, 86, 0.07);
    font-family: var(--f-serif); line-height: 1;
}
.review-card:hover { transform: translateY(-5px); }
.review-card p { font-size: 0.95rem; color: var(--c-light-brown); font-style: italic; margin-bottom: 20px; line-height: 1.8; position: relative; z-index: 2; }
.review-card h4 { font-family: var(--f-sans); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; color: var(--c-green); position: relative; z-index: 2; }

/* --- FAQ --- */
#faq { max-width: 1000px; margin: 0 auto; padding-top: 100px; padding-bottom: 60px; }
#faq h2 { font-size: 2.8rem; text-align: center; margin-bottom: 20px; }
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 60px; }
details { border-bottom: 1px solid var(--c-light-brown); padding: 20px 0; transition: all 0.3s; }
details:hover { border-bottom-color: var(--c-green); }
summary { font-family: var(--f-serif); font-size: 1.2rem; cursor: pointer; outline: none; list-style: none; display: flex; justify-content: space-between; color: var(--c-brown); }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-size: 1.5rem; color: var(--c-green); font-family: var(--f-sans); }
details[open] summary::after { content: '-'; }
details[open] summary { color: var(--c-green); }
details p { margin-top: 15px; color: var(--c-light-brown); padding-right: 40px; font-size: 0.95rem; }

/* --- 6. CONTACT & MAP --- */
#contact { padding-top: 60px; }
.contact-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.contact-info h2 { font-size: 3.5rem; margin-bottom: 20px; line-height: 1; }
.contact-info p { font-size: 1.1rem; color: var(--c-light-brown); margin-bottom: 40px; }
.info-item { margin-bottom: 25px; }
.info-item h4 { font-family: var(--f-sans); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px; color: var(--c-green); margin-bottom: 5px; }
.contact-form { margin-top: 10px; }
.contact-form input, .contact-form textarea { width: 100%; padding: 15px; margin-bottom: 20px; border: 1px solid #D5CEC4; background: transparent; font-family: var(--f-sans); font-size: 1rem; color: var(--c-brown); outline: none; transition: border-color 0.3s; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--c-green); box-shadow: 0 0 5px rgba(89, 108, 86, 0.2); }
.google-map { width: 100%; height: 450px; margin-top: 80px; border-top: 4px solid var(--c-green); }
.google-map iframe { width: 100%; height: 100%; filter: grayscale(10%); border: none; }

/* --- FOOTER --- */
footer { text-align: center; padding: 60px 8%; background: var(--c-brown); color: #A09388; font-size: 0.8rem; letter-spacing: 1px; text-transform: uppercase; border-top: 4px solid var(--c-green); }
.footer-book-btn { display: inline-block; margin-bottom: 30px; padding: 15px 50px; border: 1px solid #FFF; color: #FFF; text-decoration: none; text-transform: uppercase; letter-spacing: 2px; transition: all 0.3s; }
.footer-book-btn:hover { background: var(--c-green); border-color: var(--c-green); }

/* Footer Socials Styling */
.footer-socials { margin: 20px 0 35px 0; }
.footer-socials a { color: #A09388; text-decoration: none; font-size: 0.9rem; letter-spacing: 1px; transition: color 0.3s; }
.footer-socials a:hover { color: var(--c-green); }
.footer-sep { color: rgba(160, 147, 136, 0.3); margin: 0 15px; font-size: 0.8rem; }

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 968px) {
    h2, .section-title, .story-content h2, .contact-info h2, #guestbook h2, #faq h2 { font-size: 2.2rem !important; line-height: 1.2; }
    .hero-content h1 { font-size: 3.5rem; }
    .hero-content p { font-size: 1.5rem; }
    .villas-accordion { flex-direction: column; height: 1000px; }
    .panel { border-right: none; border-bottom: 2px solid var(--c-cream); }
    .detail-image-wrapper { height: 400px; margin-bottom: 140px; }
    .detail-overlay-box { width: 95%; padding: 30px; bottom: -80px;}
    .detail-subtitle { margin-top: 10px !important; padding-bottom: 20px; }
    .enjoy-grid, .contact-container, .story-grid { grid-template-columns: 1fr; gap: 50px; }
    .faq-grid { grid-template-columns: 1fr; gap: 0; }
    .google-map { height: 350px; }
    .contact-form { margin-top: 0; }
    .vertical-text { display: none; }
    .collage-wrapper { height: auto; display: flex; flex-direction: column; gap: 20px; }
    .img-main, .img-sub { position: relative; width: 100%; top: 0; left: 0; }
    
    /* Mobile Navbar Toggle Styling */
    .hamburger { display: flex; }
    .nav-links {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--c-cream);
        padding: 100px 40px;
        gap: 25px;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: right 0.4s ease;
        z-index: 1050;
    }
    .nav-links.active {
        right: 0;
    }
    .nav-links a {
        color: var(--c-brown) !important;
        font-size: 1rem;
        width: 100%;
        display: block;
    }
    .nav-links a:hover {
        color: var(--c-green) !important;
    }
    .mobile-only {
        display: block;
        margin-top: 20px;
        border-top: 1px solid rgba(58, 50, 45, 0.1);
        padding-top: 20px;
    }

    /* Hamburger X animation */
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .back-to-top { bottom: 20px; right: 20px; width: 40px; height: 40px; font-size: 1rem; }
}
