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

/* ============================= */
/*          SKIP LINK            */
/* ============================= */

.skip-link {
    position: absolute;
    top: -48px;
    left: 0;
    background: #fca311;
    color: #1e3a5f;
    padding: 10px 16px;
    font-weight: bold;
    z-index: 9999;
    text-decoration: none;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
}

header {
    background: #1e3a5f;
    color: white;
    padding: 20px;
    text-align: center;
}

.team-credit {
    font-size: 0.85rem;
    opacity: 0.75;
    margin-top: 6px;
}

nav {
    background: #14213d;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap;
}

nav ul li {
    margin: 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

nav ul li a:hover {
    color: #fca311;
}

/* Active nav link (set by main.js) */
nav ul li a.active {
    color: #fca311;
    border-bottom: 2px solid #fca311;
    padding-bottom: 2px;
}

/* Keyboard focus styles — accessibility requirement */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid #fca311;
    outline-offset: 2px;
}

main {
    padding: 40px;
    text-align: center;
}

footer {
    background: #1e3a5f;
    color: white;
    text-align: center;
    padding: 15px;
    margin-top: 40px;
    width: 100%;
}

footer a {
    color: #fca311;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* ============================= */
/*      SELECTOR BUTTONS         */
/* ============================= */

.selector {
    margin-top: 20px;
}

.selector button {
    padding: 12px 20px;
    margin: 10px;
    border: none;
    background-color: #1e3a5f;
    color: white;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.selector button:hover {
    background-color: #fca311;
    color: #1e3a5f;
}

/* ============================= */
/*        LUGGAGE GIF            */
/* ============================= */

.luggage-gif {
    display: block;
    margin: 28px auto 0;
    width: auto;
}

/* ============================= */
/*    RECOMMENDATION BOX         */
/* ============================= */

.recommendation-box {
    margin: 24px auto 0;
    max-width: 480px;
    background: #1e3a5f;
    color: white;
    padding: 20px 28px;
    border-radius: 12px;
    text-align: center;
    animation: fadeIn 0.4s ease;
}

.recommendation-box strong {
    display: block;
    font-size: 1.15rem;
    margin-bottom: 8px;
    color: #fca311;
}

.recommendation-box p {
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.rec-link {
    display: inline-block;
    color: #fca311;
    font-weight: bold;
    text-decoration: none;
    border: 1px solid #fca311;
    padding: 6px 16px;
    border-radius: 6px;
}

.rec-link:hover {
    background: #fca311;
    color: #1e3a5f;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================= */
/*       CITY PAGE STYLES        */
/* ============================= */

.city-about {
    max-width: 760px;
    margin: 40px auto;
    padding: 0 20px;
    text-align: left;
}

.city-about h3 {
    color: #1e3a5f;
    margin-bottom: 14px;
    font-size: 1.2rem;
}

.city-about p {
    color: #444;
    margin-bottom: 12px;
    line-height: 1.7;
}

.hero {
    background: url("../media/images/seattle-main.jpg") center/cover no-repeat;
    width: 100%;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    border-radius: 0;
}

.hero-content {
    background: rgba(255, 255, 255, 0.88);
    padding: 28px 36px;
    border-radius: 14px;
    text-align: center;
    max-width: 650px;
}

.gallery {
    margin-top: 40px;
}

.gallery-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.gallery-grid img {
    width: 250px;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

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

.dynamic-info {
    margin-top: 40px;
}

#factsContainer {
    margin-top: 20px;
    font-weight: bold;
}

button {
    background-color: #0D1B2A;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #1B263B;
}

.video-section {
    text-align: center;
    margin: 40px 0;
}

.video-section video {
    width: 80%;
    max-width: 800px;
    border-radius: 12px;
}

.audio-section {
    margin: 40px 0;
}

/* ============================= */
/*   SAN JUAN HERO OVERRIDE      */
/* ============================= */

.sanjuan-hero {
    background-image: url("../media/images/PRflagbeach.jpg");
}

/* ============================= */
/*        FLOATING GIF STYLE     */
/* ============================= */

.floating-gif {
    position: fixed;
    left: 80px;
    bottom: 100px;
    width: 130px;
    z-index: 1000;
    animation: float 4s ease-in-out infinite;
    mix-blend-mode: multiply;
}

@keyframes float {
    0%   { transform: translateY(0px); }
    50%  { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* ============================= */
/*         PLANNER PAGE          */
/* ============================= */

.planner-section {
    max-width: 720px;
    margin: 0 auto;
    text-align: left;
}

.planner-section h2 {
    text-align: center;
    margin-bottom: 8px;
}

.planner-section > p {
    text-align: center;
    color: #555;
    margin-bottom: 28px;
}

.planner-form-wrap {
    background: white;
    border-radius: 14px;
    padding: 36px 40px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
}

.planner-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-weight: bold;
    font-size: 0.95rem;
    color: #1e3a5f;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    padding: 10px 14px;
    border: 1.5px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    background: #fafafa;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #1e3a5f;
    background: white;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin-top: 4px;
}

.checkbox-group label {
    font-weight: normal;
    font-size: 0.95rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.error-msg {
    color: #c0392b;
    font-size: 0.82rem;
    display: none;
}

.generate-btn {
    background: #1e3a5f;
    color: white;
    padding: 13px 28px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    align-self: center;
    margin-top: 8px;
    transition: background 0.2s;
}

.generate-btn:hover {
    background: #fca311;
    color: #1e3a5f;
}

/* Itinerary output */
.itinerary-output {
    background: white;
    border-radius: 14px;
    padding: 36px 40px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    margin-top: 0;
    text-align: left;
}

.itinerary-output h3 {
    text-align: center;
    color: #1e3a5f;
    margin-bottom: 24px;
    font-size: 1.3rem;
}

.itinerary-day {
    background: #f0f4fa;
    border-left: 4px solid #1e3a5f;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 16px;
}

.itinerary-day h4 {
    color: #1e3a5f;
    margin-bottom: 10px;
}

.itinerary-day ul {
    padding-left: 18px;
}

.itinerary-day ul li {
    margin-bottom: 6px;
    line-height: 1.5;
    color: #333;
}

.budget-tip {
    margin-top: 20px;
    background: #fff8e8;
    border: 1px solid #fca311;
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 0.95rem;
    color: #7a5700;
}

.reset-btn {
    display: block;
    margin: 24px auto 0;
    background: #1e3a5f;
    color: white;
    padding: 11px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
}

.reset-btn:hover {
    background: #fca311;
    color: #1e3a5f;
}

/* ============================= */
/*         CREDITS PAGE          */
/* ============================= */

.credits-section {
    max-width: 860px;
    margin: 0 auto;
    text-align: left;
}

.credits-section h2 {
    text-align: center;
    margin-bottom: 10px;
}

.credits-section > p {
    text-align: center;
    color: #555;
    margin-bottom: 30px;
}

.credits-table-wrap h3 {
    margin: 28px 0 10px;
    color: #1e3a5f;
    font-size: 1.05rem;
    border-bottom: 2px solid #1e3a5f;
    padding-bottom: 4px;
}

.credits-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}

.credits-table th {
    background: #1e3a5f;
    color: white;
    padding: 10px 14px;
    text-align: left;
}

.credits-table td {
    padding: 9px 14px;
    border-bottom: 1px solid #eee;
    color: #333;
    vertical-align: top;
}

.credits-table tr:last-child td {
    border-bottom: none;
}

.credits-table tr:hover td {
    background: #f5f8ff;
}

/* ============================= */
/*         ABOUT PAGE            */
/* ============================= */

.about-section {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.about-section > p {
    color: #555;
    margin-bottom: 36px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
    text-align: left;
}

.team-card {
    background: white;
    border-radius: 14px;
    padding: 28px 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.09);
    transition: transform 0.2s;
}

.team-card:hover {
    transform: translateY(-4px);
}

.team-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #1e3a5f;
    color: white;
    font-size: 1.6rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.team-card h3 {
    color: #1e3a5f;
    margin-bottom: 4px;
}

.team-card .role {
    color: #fca311;
    font-weight: bold;
    font-size: 0.88rem;
    margin-bottom: 10px;
    display: block;
}

.team-card p {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.6;
}

.tech-section {
    margin-top: 8px;
}

.tech-section h3 {
    color: #1e3a5f;
    margin-bottom: 16px;
}

.tech-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.tech-chip {
    background: #1e3a5f;
    color: white;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: bold;
}

/* ============================= */
/*        CONTACT PAGE           */
/* ============================= */

.contact-section {
    max-width: 640px;
    margin: 0 auto;
}

.contact-section h2 {
    text-align: center;
    margin-bottom: 8px;
}

.contact-section > p {
    text-align: center;
    color: #555;
    margin-bottom: 28px;
}

.contact-form-wrap {
    background: white;
    border-radius: 14px;
    padding: 36px 40px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form textarea {
    padding: 10px 14px;
    border: 1.5px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: #fafafa;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.2s;
}

.contact-form textarea:focus {
    border-color: #1e3a5f;
    background: white;
    outline: 3px solid #fca311;
    outline-offset: 2px;
}

.submit-btn {
    background: #1e3a5f;
    color: white;
    padding: 13px 28px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    align-self: center;
    transition: background 0.2s;
}

.submit-btn:hover {
    background: #fca311;
    color: #1e3a5f;
}

.success-msg {
    display: none;
    background: #e8f5e9;
    border: 1px solid #4caf50;
    color: #2e7d32;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    font-weight: bold;
    margin-top: 20px;
}

/* ============================= */
/*       RESPONSIVE / MOBILE     */
/* ============================= */

@media (max-width: 768px) {

    /* Header */
    header {
        padding: 16px 12px;
    }

    header h1 {
        font-size: 1.6rem;
    }

    /* Nav */
    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 0;
    }

    nav ul li {
        margin: 8px 0;
    }

    /* Main padding */
    main {
        padding: 24px 16px;
    }

    /* Hero */
    .hero {
        min-height: 280px;
        padding: 20px 16px;
    }

    .hero-content {
        padding: 20px 18px;
        margin: 0 12px;
    }

    .hero-content h2 {
        font-size: 1.3rem;
    }

    /* Gallery */
    .gallery-grid {
        flex-direction: column;
        align-items: center;
    }

    .gallery-grid img {
        width: 90%;
        height: 180px;
    }

    /* Video */
    .video-section video {
        width: 100%;
    }

    /* Floating GIF — hide on mobile so it doesn't block content */
    .floating-gif {
        display: none;
    }

    /* Planner form */
    .planner-form-wrap {
        padding: 24px 16px;
    }

    .itinerary-output {
        padding: 24px 16px;
    }

    /* Credits table — make it scrollable */
    .credits-table-wrap {
        overflow-x: auto;
    }

    /* Selector buttons */
    .selector button {
        display: block;
        width: 80%;
        margin: 8px auto;
    }

    /* Recommendation box */
    .recommendation-box {
        margin: 16px 12px 0;
    }
}

@media (max-width: 480px) {

    header h1 {
        font-size: 1.3rem;
    }

    .hero-content h2 {
        font-size: 1.1rem;
    }

    .hero-content p {
        font-size: 0.9rem;
    }

    .gallery-grid img {
        width: 100%;
    }

    .planner-form-wrap {
        padding: 16px 12px;
    }

    .generate-btn {
        width: 100%;
    }

    .luggage-gif {
        width: 120px;
    }
}