/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #e2e8f0;
    background-color: #0f172a;
}

:root {
    /* Approximate fixed navbar height to offset hero content */
    --nav-offset: 72px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Fraunces', serif;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    font-weight: 600;
}

h3 {
    font-size: 1.8rem;
    font-weight: 500;
}

h4 {
    font-size: 1.4rem;
    font-weight: 500;
}

p {
    margin-bottom: 1rem;
    color: #cbd5e1;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h2 {
    color: #f8fafc;
    font-size: 1.8rem;
    margin: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #60a5fa;
}

/* Hero Section */
.hero {
    height: calc(90vh - var(--nav-offset));
    padding-top: var(--nav-offset);
    background-size: cover;
    background-position: center;
    background-attachment: scroll; /* default to scroll to avoid mobile pixelation */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
}

/* Sharper hero: allow optional <img class="hero-bg"> inside .hero */
.hero .hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}

/* Gradient overlay when using hero-bg */
.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(2,6,23,.65), rgba(2,6,23,.35));
    z-index: 1;
}

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

.hero-content h1 {
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.2rem;
    color: #e2e8f0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Main Content Sections */
main {
    padding: 4rem 0;
}

section {
    padding: 4rem 0;
}

/* Reduce extra gap between hero and first content section */
header.hero + main { padding-top: 1.5rem; }
header.hero + main section:first-of-type { padding-top: 1.5rem; }

section h2 {
    text-align: center;
    margin-bottom: 3rem;
}

/* Amenities Section */
.amenities-list {
    max-width: 800px;
    margin: 0 auto;
    margin-top: 2rem;
}

.amenity-item {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.amenity-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.amenity-item h3 {
    color: #60a5fa;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.amenity-item ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.amenity-item li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #cbd5e1;
    line-height: 1.6;
}

.amenity-item li:before {
    content: "•";
    color: #60a5fa;
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Section Intro and Headers */
.section-intro {
    max-width: 800px;
    margin: 0 auto;
    margin-top: 2rem;
    text-align: center;
}

.section-intro p {
    font-size: 1.1rem;
    color: #cbd5e1;
    line-height: 1.6;
}

.section-subheader {
    max-width: 800px;
    margin: 0 auto;
    margin-top: 3rem;
    margin-bottom: 2rem;
    text-align: center;
}

.section-subheader h3 {
    color: #60a5fa;
    font-size: 1.6rem;
    margin: 0;
}

/* Section Images */
.section-image {
    max-width: 800px;
    margin: 0 auto;
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.section-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.section-images {
    max-width: 800px;
    margin: 0 auto;
    margin-top: 2rem;
    margin-bottom: 3rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.section-images .section-image {
    margin: 0;
}

.section-images .section-image img {
    height: 250px;
}

/* Beaches Section */
.beach-list {
    max-width: 800px;
    margin: 0 auto;
    margin-top: 2rem;
}

.beach-item {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.beach-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.beach-item h3 {
    color: #60a5fa;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.beach-item ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.beach-item li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #cbd5e1;
    line-height: 1.6;
    max-width: 100%;
    word-wrap: break-word;
}

.beach-item li:before {
    content: "•";
    color: #60a5fa;
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 1.2rem;
}



/* Activities Section */
.activity-list {
    max-width: 800px;
    margin: 0 auto;
    margin-top: 2rem;
}

.activity-item {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.activity-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.activity-item h3 {
    color: #60a5fa;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.activity-item ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.activity-item li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #cbd5e1;
    line-height: 1.6;
    max-width: 100%;
    word-wrap: break-word;
}

.activity-item li:before {
    content: "•";
    color: #60a5fa;
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 1.2rem;
}



/* Dining Section */
.dining-section {
    margin-bottom: 3rem;
}

.dining-section h3 {
    color: #60a5fa;
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
}

.restaurant-list {
    max-width: 800px;
    margin: 0 auto;
    margin-top: 2rem;
}

.restaurant-item {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.restaurant-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.restaurant-item h4 {
    color: #60a5fa;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.restaurant-item ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.restaurant-item li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #cbd5e1;
    line-height: 1.6;
    max-width: 100%;
    word-wrap: break-word;
}

.restaurant-item li:before {
    content: "•";
    color: #60a5fa;
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 1.2rem;
}



/* Rules Section */
.rule-section {
    background: rgba(30, 41, 59, 0.8);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    margin-bottom: 2rem;
}

.rule-section h3 {
    color: #60a5fa;
    margin-bottom: 1rem;
}

.rule-section ul {
    list-style: none;
    padding-left: 0;
}

.rule-section li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    position: relative;
    padding-left: 1.5rem;
}

.rule-section li:before {
    content: "•";
    color: #60a5fa;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.rule-section li:last-child {
    border-bottom: none;
}

/* Contact Form */
.contact {
    background: rgba(30, 41, 59, 0.8);
    padding: 4rem 0;
    margin-top: 4rem;
}

.contact h2 {
    text-align: center;
    margin-bottom: 1rem;
}

.contact p {
    text-align: center;
    margin-bottom: 3rem;
    color: #cbd5e1;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #f8fafc;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.8);
    color: #f8fafc;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Rules Form Specific Styles */
.rules .container {
    max-width: 800px;
}

.questionnaire {
    background: rgba(30, 41, 59, 0.8);
    padding: 4rem 0;
    margin-top: 4rem;
}

.questionnaire h2 {
    text-align: center;
    margin-bottom: 1rem;
}

.questionnaire p {
    text-align: center;
    margin-bottom: 3rem;
    color: #cbd5e1;
}

.rules-form {
    max-width: 600px;
    margin: 0 auto;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 400;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    margin-top: 0.25rem;
}

/* Guest Fields */
.guest-fields {
    background: rgba(15, 23, 42, 0.5);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.guest-fields h4 {
    color: #60a5fa;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.guest-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1rem;
}

.guest-row:last-child {
    margin-bottom: 0;
}

.remove-guest-btn {
    background: #dc2626;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.3s ease;
}

.remove-guest-btn:hover {
    background: #b91c1c;
}

.add-guest-btn {
    background: #059669;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
    margin-bottom: 1.5rem;
}

.add-guest-btn:hover {
    background: #047857;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.btn-primary:disabled {
    background: #64748b;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Form Messages */
.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.form-message.success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.form-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Footer */
footer {
    background: rgba(15, 23, 42, 0.95);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

footer p {
    color: #94a3b8;
    margin: 0;
}

/* Links */
a {
    color: #60a5fa;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #93c5fd;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Reduce hero height and adjust focal point on tablets/large phones */
    .hero {
        height: 52vh !important;
        background-attachment: scroll;
        /* maintain sharpness with cover; control focal point */
        background-size: auto, cover !important; /* [gradient],[image] */
        background-position: center, center 28% !important; /* [gradient],[image] */
        background-repeat: no-repeat, no-repeat !important;
    }
    .hero .hero-bg { object-position: center 28%; }
    .nav-menu {
        gap: 1rem;
    }
    
    .nav-logo h2 {
        font-size: 1.5rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .amenities-grid,
    .beach-grid,
    .activity-grid,
    .restaurant-grid {
        grid-template-columns: 1fr;
    }
    
    .guest-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .amenity-card,
    .beach-card,
    .activity-card,
    .restaurant-card,
    .rule-section {
        padding: 1.5rem;
    }
    
    /* Mobile image layouts */
    .section-images {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .section-image img {
        height: 200px;
    }
}

@media (max-width: 600px) {
    .hero {
        height: 48vh !important;
        /* Use multi-layer sizing: [gradient],[image] */
        background-size: auto, cover !important;
        background-position: center, center 25% !important;
        background-repeat: no-repeat, no-repeat !important;
    }
    .hero .hero-bg { object-position: center 25%; }
}

@media (max-width: 480px) {
    /* Improve hero image rendering on small screens */
    .hero {
        height: 42vh !important; /* override inline height on pages that set it */
        background-attachment: scroll; /* fix iOS Safari issues with fixed backgrounds */
        /* Ensure the full image fits to reduce perceived zoom; keep gradient full */
        background-size: auto, cover !important; /* [gradient],[image] */
        background-position: center, center 20% !important; /* [gradient],[image] */
        background-repeat: no-repeat, no-repeat !important;
    }
    .hero .hero-bg { object-position: center 20%; }
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Tablet/mobile: disable parallax and adjust focal point to reduce cropping */
@media (max-width: 1024px) {
    .hero {
        background-attachment: scroll;
        background-position: center 30%;
    }
}

/* Desktop+: allow parallax where it renders crisply */
@media (min-width: 1200px) {
    .hero {
        background-attachment: fixed;
    }
}