/* ---
    NEW MODERN STYLE
    Fonts: 'Playfair Display' (headings), 'Open Sans' (body)
    Palette: Charcoal, Gold, Off-White
--- */

:root {
    --primary-color: #2c2c2c; /* Deep Charcoal */
    --accent-color: #D4AF37; /* Classic Gold */
    --accent-hover: #b89a30;
    --bg-light: #f9f9f9;
    --text-color: #333;
    --text-light: #555;
    --white: #ffffff;
    --border-color: #eaeaea;
    --shadow: 0 5px 15px rgba(0,0,0,0.07);
    --shadow-hover: 0 8px 25px rgba(0,0,0,0.1);
}

body {
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    background-color: var(--white);
    line-height: 1.7;
    font-weight: 400;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px; /* Default horizontal padding for all content */
}

h1, h2 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 20px;
}

h1 { font-size: 3.5rem; letter-spacing: 0.5px; }
h2 { font-size: 2.5rem; }

/* --- Navbar --- */
.navbar {
    background: var(--white);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.navbar nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 30px;
    transition: color 0.3s ease;
}

.navbar nav a:hover {
    color: var(--accent-color);
}

/* --- Contact Section (Shared Styles with .contact-info) --- */
.contact-section {
    background: var(--primary-color);
    color: var(--bg-light);
    padding: 80px 0;
    text-align: center;
}

.contact-section h2 {
    color: var(--white);
    margin-bottom: 30px;
}

.contact-info {
    max-width: 600px;
    margin: 0 auto;
}

.contact-info p {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 15px 0;
}

.contact-info a {
    color: var(--accent-color); /* Gold color for links */
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: var(--accent-hover);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    height: 70vh;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%; /* Adjust as needed */
    filter: brightness(0.8);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0) 60%, rgba(0,0,0,0.6) 100%);
    color: var(--white);
    display: flex;
    align-items: flex-end;
}

.hero-overlay .container {
    padding-bottom: 60px;
}

.hero .subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    margin: 0;
    opacity: 0.9;
}

.hero .price {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-top: 10px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* --- Full-Width Gallery Image Style --- */
.gallery-full-width {
    margin-bottom: 30px; /* Adds space between the hero shot and the grid below */
}

.gallery-full-width img {
    width: 100%; /* Forces the image to span the full width of the container */
    height: auto; /* Maintains the image's aspect ratio */
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.gallery-full-width img:hover {
    /* Subtle hover effect to indicate it is clickable */
    transform: scale(1.005);
    box-shadow: var(--shadow-hover);
}

/* --- Content Sections --- */
.content-section {
    padding: 80px 0;
}

#overview p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 1200px;
}

/* --- Details Section --- */
.details-section {
    background-color: var(--bg-light);
    padding: 80px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.detail-item {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.detail-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.detail-item strong {
    display: block;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item span {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    color: var(--accent-color);
    font-weight: 700;
}

/* --- Gallery Section --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-grid img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.gallery-grid img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
    z-index: 10;
    position: relative;
}

/* --- Contact Section (Additional Content Styling) --- */
.contact-section p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.contact-form {
    max-width: 600px;
    margin: 40px auto 0;
    display: grid;
    gap: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 18px 20px;
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    border-radius: 8px;
    border: 1px solid var(--text-light);
    background: #3b3b3b;
    color: var(--white);
    box-sizing: border-box;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #aaa;
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.cta-button {
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 18px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.cta-button:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
}

/* --- Footer --- */
.footer {
    background: var(--white);
    color: #777;
    padding: 50px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer p {
    margin: 5px 0;
    font-size: 0.9rem;
}

/* --- Map Section Styles --- */

.map-section h2 {
    text-align: left;
    margin-bottom: 30px;
}

.map-container {
    /* Sets the responsive aspect ratio (16:9) and max width */
    position: relative;
    padding-bottom: 56.25%; /* This sets the height based on 16:9 ratio of the width */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.map-container iframe {
    /* CRITICAL: This makes the map fill 100% of the map-container area */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* --- Lightbox Gallery Styles --- */

.lightbox {
    /* Initially hidden and fixed over the viewport */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 1000;
}

/* When the anchor link is clicked, the lightbox ID matches the URL hash, making it visible */
.lightbox:target {
    opacity: 1;
    pointer-events: auto;
}

.lightbox img {
    /* Styles for the enlarged image */
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    object-fit: contain; /* Ensures the whole image is visible */
    width: auto; /* Override gallery image width */
    height: auto; /* Override gallery image height */
    transform: scale(0.9);
    transition: transform 0.4s ease;
}

.lightbox:target img {
    /* Scale the image up when the lightbox is active */
    transform: scale(1);
}

.close-btn {
    /* The 'X' button to close the lightbox */
    position: absolute;
    top: 20px;
    right: 40px;
    color: var(--white);
    font-size: 50px;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.close-btn:hover {
    opacity: 1;
}

/* Mobile Adjustments for Lightbox */
@media (max-width: 600px) {
    .close-btn {
        font-size: 30px;
        top: 15px;
        right: 25px;
    }
}

/* --- Dynamic Scaling (Responsive Design) --- */

/* Medium Screens (Tablets / Landscape Phones) */
@media (max-width: 768px) {
    /* Fix 1: Navbar scaling and single-line navigation */
    .navbar .container {
        flex-direction: column;
        gap: 20px;
        padding-bottom: 10px;
    }

    .navbar nav {
        /* Allows horizontal scrolling if links overflow on small tablets */
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .navbar nav a {
        /* Forces all links onto a single line and slightly reduces size */
        display: inline-block;
        white-space: nowrap;
        font-size: 0.85rem; /* Slightly smaller links */
        padding: 0 5px;
        margin: 0 8px;
    }

    /* Main Content Adjustments */
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }

    .hero {
        height: 60vh;
    }

    .hero .price {
        font-size: 2.5rem;
    }

    .details-grid {
        grid-template-columns: 1fr 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr 1fr;
    }

    .contact-info p {
        font-size: 1.4rem;
    }
}

/* Small Screens (Smartphones) */
@media (max-width: 480px) {
    h1 { font-size: 2.2rem; }

    .hero {
        height: 50vh;
    }

    .hero-overlay .container {
        padding-bottom: 30px;
    }

    /* Fix 2: Ensures consistent 20px padding for all main content sections
        and handles the Key Details (details-section) edge-to-edge issue. */
    .content-section, .details-section, .contact-section, .map-section {
        padding: 50px 20px;
    }

    /* We still allow the container to reduce its internal padding on the smallest screens
        for max content visibility, but the section padding above ensures no edge-to-edge content. */
    .container {
        padding: 0 10px;
    }

    /* Force single column for Details and Gallery to prevent clipping */
    .details-grid, .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* --- START: Kaka'ako History Storyboard Styles --- */

/* --- CUSTOM VARIABLE DEFINITIONS --- */
.kakaako-history-storyboard-css {
	/* Define variables locally for the widget's scope */
	--primary-color: #2c2c2c;
	--accent-color: #D4AF37;
	--accent-hover: #b89a30;
	--text-color: #333;
	--text-light: #555;
	--white: #ffffff;
	--border-color: #eaeaea;

	/* --- BASE STYLES (Reverted for subtle divider style) --- */
	max-width: 100%;
	width: 100%;
	margin: 0 auto;
	padding: 0; /* REMOVED internal padding */
	box-sizing: border-box;
	font-family: 'Open Sans', sans-serif;
	line-height: 1.7;
	background-color: transparent; /* Transparent background */
	color: var(--text-color);
	position: relative;
	/* REMOVED: border-radius, box-shadow */
}

.kakaako-history-storyboard-css h2 {
	font-family: 'Playfair Display', serif;
	font-weight: 700;
	color: var(--primary-color);
	font-size: 2.5rem;
	margin-top: 0;
	margin-bottom: 20px;
	padding-bottom: 15px;
	padding-top: 10px;
	border-bottom: 1px solid var(--border-color); /* This acts as the subtle divider */
}

.kakaako-history-storyboard-css > p {
	margin-bottom: 25px;
}

/* Hides the actual radio buttons */
.kakaako-history-storyboard-css input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

/* --- SLIDE STYLES --- */
.storyboard-container {
	min-height: 280px;
	padding-top: 10px;
	position: relative;
	overflow: hidden;
}

.story-slide {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	padding: 20px 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.5s ease-in-out;
}

.story-slide strong {
	color: var(--primary-color);
	font-family: 'Playfair Display', serif;
	font-size: 1.8em;
	font-weight: 600;
	display: block;
	margin-bottom: 10px;
}

/* --- RADIO CHECKED LOGIC (CSS Slideshow) --- */
#slide1:checked ~ .storyboard-container .slide-1,
#slide2:checked ~ .storyboard-container .slide-2,
#slide3:checked ~ .storyboard-container .slide-3,
#slide4:checked ~ .storyboard-container .slide-4,
#slide5:checked ~ .storyboard-container .slide-5,
#slide6:checked ~ .storyboard-container .slide-6 {
	opacity: 1;
	visibility: visible;
	position: static;
}

/* --- NAVIGATION STYLES --- */

.storyboard-navigation {
	display: flex;
	justify-content: space-between;
	margin-top: 30px;
	align-items: center;
	padding-bottom: 30px;
}

.storyboard-btn {
	background-color: var(--accent-color);
	color: var(--white);
	border: none;
	padding: 12px 25px;
	cursor: pointer;
	font-size: 1em;
	border-radius: 4px;
	transition: background-color 0.3s;
	min-width: 140px;
	text-align: center;
	font-weight: 600;
	display: none;
	user-select: none; /* Added to prevent text selection during clicks */
}

.storyboard-btn:hover {
	background-color: var(--accent-hover);
}

/* BACK Button Logic: Show 'Back' button when on slide 2 through 6 */
#slide2:checked ~ .storyboard-navigation .btn-back-2,
#slide3:checked ~ .storyboard-navigation .btn-back-3,
#slide4:checked ~ .storyboard-navigation .btn-back-4,
#slide5:checked ~ .storyboard-navigation .btn-back-5,
#slide6:checked ~ .storyboard-navigation .btn-back-6 {
	display: block;
}

/* NEXT Button Logic: Show 'Next' button when on slide 1 through 5 */
#slide1:checked ~ .storyboard-navigation .btn-next-1,
#slide2:checked ~ .storyboard-navigation .btn-next-2,
#slide3:checked ~ .storyboard-navigation .btn-next-3,
#slide4:checked ~ .storyboard-navigation .btn-next-4,
#slide5:checked ~ .storyboard-navigation .btn-next-5 {
	display: block;
}

/* Slide Counter Logic */
.slide-counter {
	font-size: 0.9em;
	color: var(--text-light);
	font-weight: 500;
	min-width: 40px;
	text-align: center;
	position: relative;
	height: 1.1em;
}

.slide-counter span {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	display: none;
}

/* Show the correct counter for slides 1 through 6 */
#slide1:checked ~ .storyboard-navigation .counter-1,
#slide2:checked ~ .storyboard-navigation .counter-2,
#slide3:checked ~ .storyboard-navigation .counter-3,
#slide4:checked ~ .storyboard-navigation .counter-4,
#slide5:checked ~ .storyboard-navigation .counter-5,
#slide6:checked ~ .storyboard-navigation .counter-6 {
	display: block;
}

/* Responsive Adjustments */
@media (max-width: 600px) {
	.kakaako-history-storyboard-css h2 {
		font-size: 1.8rem;
	}
	.storyboard-btn {
		min-width: 100px;
		padding: 10px 15px;
	}
	.storyboard-navigation {
		flex-direction: column;
		gap: 10px;
	}
	.storyboard-btn {
		width: 100%;
	}
	.slide-counter {
		order: -1;
		margin-bottom: 10px;
	}
	.storyboard-container {
		min-height: 350px;
	}
	/* Mobile adjustment for padding if needed, but current setup is clean */
	.kakaako-history-storyboard-css {
		padding: 0; /* Ensure no extra padding is introduced */
	}
}

/* --- END: Kaka'ako History Storyboard Styles --- */