/* --- RESET & VARIABLES --- */
:root {
    --primary-color: #006994; /* Caribbean Blue */
    --text-dark: #2c3e50;
    --text-light: #ecf0f1;
    --bg-white: #ffffff;
    --bg-offwhite: #f9f9f9;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Lato', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-white);
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4 {
    font-family: var(--font-serif);
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; line-height: 1.1; }
h2 { font-size: 2.5rem; color: var(--primary-color); text-align: center; }
p { margin-bottom: 1rem; font-size: 1.1rem; }

/* --- NAVIGATION --- */
.navbar {
    padding: 1.5rem 0;
    position: absolute;
    width: 100%;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
}

.navbar.solid-nav {
    background-color: var(--primary-color);
    position: relative;
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    text-decoration: none;
    color: #fff; 
    font-weight: bold;
    white-space: nowrap; 
    
    /* These lines align the image and text: */
    display: flex;
    align-items: center;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center; 
}

.nav-links a {
    color: white;
    font-weight: 400;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links a:hover {
    opacity: 0.8;
}

.hamburger { display: none; color: white; font-size: 1.5rem; cursor: pointer; }

/* --- HERO SECTION --- */
.hero {
    height: 100vh;
    background-image: url('images/hero-view.jpg'); 
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.3);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 20px;
}

.hero-buttons {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* --- BUTTONS --- */
.btn {
    padding: 12px 30px;
    border-radius: 2px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #005072;
}

.btn-outline {
    border: 2px solid white;
    color: white;
}

.btn-outline:hover {
    background-color: white;
    color: var(--text-dark);
}

.btn-nav {
    border: 1px solid white;
    padding: 8px 20px;
    border-radius: 2px;
    display: inline-block;
}

/* --- SECTIONS --- */
.intro {
    padding: 4rem 0;
    text-align: center;
    max-width: 800px;
}

.cottages-section {
    padding: 4rem 0;
    background-color: var(--bg-offwhite);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.card {
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-radius: 4px;
    overflow: hidden;
}

.card-image {
    height: 300px;
    background-color: #ddd;
    background-size: cover;
    background-position: center;
}

.placeholder-1 { background-image: url('images/horizons-thumb.jpg'); }
.placeholder-2 { background-image: url('images/sugar-bird-thumb.jpg'); }

.card-text {
    padding: 2rem;
}

.text-link {
    color: var(--primary-color);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-top: 1rem;
    display: inline-block;
}

/* --- MEDIA SECTION (Panorama & Video) --- */
.media-section {
    padding: 4rem 0;
    background-color: var(--bg-white);
    text-align: center;
}

.media-block {
    margin-bottom: 4rem;
}

.media-block:last-child {
    margin-bottom: 0;
}

.feature-img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.caption {
    margin-top: 1.5rem;
    font-style: italic;
    color: #555;
    font-size: 1rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.video-wrapper video {
    width: 100%;
    max-width: 1000px;
    border-radius: 4px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* --- FOOTER --- */
footer {
    background-color: var(--text-dark);
    color: rgba(255,255,255,0.7);
    padding: 3rem 0;
    text-align: center;
}

footer a:hover { color: white; }

/* --- SUB-PAGE STYLES --- */
.page-header {
    text-align: center;
    padding: 3rem 0 1rem;
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-top: -0.5rem;
}

.padding-block { padding: 4rem 0; }
.bg-offwhite { background-color: var(--bg-offwhite); }
.bg-blue { background-color: var(--primary-color); }
.text-white { color: white; }
.centered-text { text-align: center; max-width: 800px; margin: 0 auto; }
.mb-2 { margin-bottom: 2rem; }
.mt-4 { margin-top: 2rem; }
.mt-2 { margin-top: 1rem; }

/* Images */
.hero-img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
}

.medium-centered-img {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    display: block;
    border-radius: 4px;
}

.rounded { border-radius: 4px; }
.shadow { box-shadow: 0 5px 15px rgba(0,0,0,0.1); }

/* --- SWIPEABLE GALLERY STYLES (CRITICAL FOR STACKING) --- */
.gallery-container {
    position: relative;
    max-width: 100%;
    z-index: 1;
}

.swipe-gallery {
    display: flex; /* THIS MAKES IT STACK HORIZONTALLY */
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    padding-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    z-index: 1;
}

.swipe-gallery::-webkit-scrollbar {
    display: none;
}

.swipe-gallery img {
    flex: 0 0 90%;
    scroll-snap-align: center;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    height: 400px;
    object-fit: cover;
}

/* Gallery Navigation Buttons */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 999; 
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background-color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.nav-btn.prev { left: 10px; }
.nav-btn.next { right: 10px; }

/* Amenities List */
.amenities-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    text-align: left;
    max-width: 900px;
    margin: 2rem auto;
}

.amenities-grid ul {
    list-style: none;
}

.amenities-grid li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.amenities-grid li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--bg-offwhite);
}

/* Review Cards Styling */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.review-card {
    background: white;
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-top: 3px solid transparent; 
}

/* Grid for Large Photos (used in subpages) */
.grid-2-large {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

/* --- MOBILE RESPONSIVENESS --- */

/* Tablet Optimization (Between 769px and 1000px) */
@media (min-width: 769px) and (max-width: 1000px) {
    .nav-links { gap: 1rem; } 
    .nav-links a { font-size: 0.85rem; } 
    .logo { font-size: 1.2rem; }
    .btn-nav { padding: 6px 12px; }
}

/* Mobile (Under 768px) */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hamburger { display: block; }
    .grid-2 { grid-template-columns: 1fr; }
    .grid-2-large { grid-template-columns: 1fr; }
    h1 { font-size: 2rem; }
    h2 { font-size: 2rem; }
    .media-section { padding: 2rem 0; }
    .amenities-grid { grid-template-columns: 1fr; }
    
    /* Hide scroll buttons on mobile - use swipe */
    .nav-btn { display: none; }
}

@media (min-width: 768px) {
    .swipe-gallery img {
        flex: 0 0 45%; 
    }
}