:root {
    --primary: #0f6527;
    --primary-dark: #0a461b;
    --secondary: #ff6600;
    /* Orange for Highlights/Links */
    --accent: #ff6600;
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.8);
    --text-main: #2c3e50;
    --text-light: #5d6d7e;
    --white: #ffffff;
    --shadow: 0 10px 40px rgba(15, 101, 39, 0.1);
    --radius: 16px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-main);
    background: #f0f2f5;
    background-image:
        radial-gradient(at 0% 0%, hsla(136, 96%, 70%, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, hsla(24, 95%, 68%, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
    min-height: 100vh;
    padding-bottom: 5px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 20px 5px 20px;
}

/* --- Header --- */
.app-header {
    text-align: center;
    margin-bottom: 30px;
    padding-top: 20px;
}

.app-header h1 {
    font-family: 'Montserrat', sans-serif;
    /* Standard font for Mochilero */
    font-weight: 700;
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 5px;
    line-height: 1.2;
}

.app-header p {
    font-family: 'Mulish', sans-serif;
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 300;
}

/* --- Glass Panel (Cards) --- */
.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 30px;
}

/* --- Form Grid --- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.input-group {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.input-group.full-width {
    grid-column: span 2;
}

label {
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

label i {
    color: var(--primary);
}

input,
select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

input:focus,
select:focus {
    border-color: var(--secondary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

/* Budget Wrapper */
.budget-wrapper {
    display: flex;
    gap: 10px;
}

.budget-wrapper select {
    width: 90px;
    flex-shrink: 0;
}

.budget-wrapper input {
    flex: 1;
}

/* Checkbox Style */
.checkbox-wrapper {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-wrapper input {
    width: auto;
    margin: 0;
}

.checkbox-wrapper label {
    margin: 0;
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* --- Trip Type Grid (Fixed) --- */
.trip-types {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.trip-types input[type="radio"] {
    display: none;
}

.type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 120px;
    /* Fixed Height */
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    gap: 8px;
}

.type-card i {
    font-size: 1.8rem;
    color: #cbd5e1;
    transition: color 0.2s;
}

.type-card span {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-light);
}

/* Selected State */
.trip-types input:checked+.type-card {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(15, 101, 39, 0.3);
    transform: translateY(-2px);
}

.trip-types input:checked+.type-card i,
.trip-types input:checked+.type-card span {
    color: white;
}

/* Hover State */
.type-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* --- Main CTA Button --- */
.cta-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(90deg, var(--primary) 0%, #158f36 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(15, 101, 39, 0.25);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(15, 101, 39, 0.35);
}

.cta-button:active {
    transform: scale(0.98);
}

.cta-button.secondary-btn {
    background: #64748b;
    box-shadow: none;
    margin-top: 0;
    /* Removed default spacing to control via container */
}

/* --- Results --- */
.hidden {
    display: none !important;
}

#loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(15, 101, 39, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.trip-summary {
    border-left: 5px solid var(--primary);
    padding: 25px;
}

.trip-summary h2 {
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

/* Summary Tags */
.summary-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.summary-tags span {
    background: #f1f5f9;
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
}

/* Itinerary */
.day-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f5f9;
}

.day-header {
    background: var(--secondary);
    /* Orange headers */
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.day-header h3 {
    font-size: 1.1rem;
    margin: 0;
}

.day-date {
    opacity: 0.9;
    font-size: 0.9rem;
}

.day-body {
    padding: 20px;
}

.activity-item {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.activity-item:last-child {
    margin-bottom: 0;
}

.time-slot {
    font-weight: 700;
    color: var(--secondary);
    min-width: 55px;
    font-size: 0.9rem;
}

.activity-desc p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.5;
}

.activity-desc strong {
    color: var(--text-main);
    display: block;
    margin-bottom: 4px;
}

.activity-desc a {
    color: var(--secondary) !important;
    text-decoration: none !important;
    font-weight: 700;
    transition: color 0.2s;
}

.activity-desc a:hover {
    color: var(--primary) !important;
    /* Forces Green on Hover */
    text-decoration: underline !important;
}

/* --- Hotel/Map Section --- */
.resources-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 0px;
}

.resources-section .glass-panel {
    margin-bottom: 0 !important;
    /* Fixes the 30px ghost gap */
}

.resources-section h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.hotel-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 10px;
    text-decoration: none;
    gap: 10px;
    color: var(--text-main);
    transition: background 0.2s;
}

.hotel-btn:hover {
    background: #f8fafc;
    border-color: var(--secondary);
}

.hotel-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--secondary);
    font-weight: 700;
    display: block;
}

.hotel-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.booking-logo {
    color: #003580;
    font-weight: 700;
}

#google-map {
    width: 100%;
    height: 300px;
    border: 0;
    border-radius: 8px;
}

/* --- Final Sections --- */
.final-cta {
    text-align: center;
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    margin-top: 30px;
}

.final-cta p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text-main);
}

.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25D366;
    color: white;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s;
}

.whatsapp-btn:hover {
    transform: scale(1.05);
}

/* --- Action Section --- */
.cta-section {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 0px;
}

/* --- Footer & Social --- */
.social-media-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0 20px 0;
}

.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    /* Orange icons */
    font-size: 1.2rem;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.social-btn:hover {
    transform: translateY(-3px);
    background: var(--secondary);
    color: white;
}

.app-footer {
    text-align: center;
    font-size: 0.9rem;
    color: #94a3b8;
    margin-top: 0px;
    padding-bottom: 0px;
}

.app-footer img {
    width: 60px;
    /* Default Mobile */
    height: auto;
    margin-bottom: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}



/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .input-group.full-width {
        grid-column: span 1;
    }

    .resources-section {
        grid-template-columns: 1fr;
    }

    .app-header h1 {
        font-size: 2.5rem;
    }

    .trip-types {
        gap: 10px;
    }

    .type-card {
        height: 110px;
    }

    /* Better styling for action buttons on mobile */
    .cta-button.secondary-btn {
        width: auto !important;
        margin-bottom: 10px;
        font-size: 1rem;
        padding: 10px 15px;
    }

    .hotel-btn {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    /* Fix: Activity overlap on mobile - STACKED like Viajeros */
    .activity-item {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        /* Reset grid if present */
        gap: 5px;
    }

    .time-slot {
        min-width: auto;
        color: var(--secondary);
        font-size: 1rem;
        /* Bigger for readability */
        margin-bottom: 5px;
    }

    /* Fix: Button stacking on mobile */
    .cta-button.secondary-btn {
        width: 100% !important;
        margin-left: 0 !important;
        margin-bottom: 10px;
        justify-content: center;
    }
}

/* Useful Links Color (Secondary for Mochilero) */
/* Day Header Green */
.day-header {
    background: var(--primary);
    /* #0f6527 */
    color: white;
    padding: 15px;
    border-radius: var(--radius) var(--radius) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Activity Layout Fix - Grid to prevent collision */
.activity-item {
    display: grid;
    grid-template-columns: 85px 1fr;
    /* Fixed width for time */
    gap: 15px;
    margin-bottom: 15px;
    align-items: start;
}

.time-slot {
    font-weight: 700;
    color: var(--secondary);
    font-size: 0.9rem;
    word-break: break-word;
    /* Wrap if very long */
}

/* Useful Links Hover Effect */
/* Useful Links Hover Effect */
.useful-link {
    text-decoration: none;
    color: var(--secondary) !important;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s ease;
}

.useful-link:hover {
    color: var(--primary) !important;
    /* Green on hover */
    text-decoration: underline !important;
}

/* Recommended Button Hover */
.rec-btn:hover {
    background-color: #c8e6c9 !important;
    /* Darker Green for visibility */
    transition: background-color 0.2s ease;
}

/* Reduce Desktop Spacing - SINGLE TRUTH SOURCE */
@media (min-width: 769px) {
    .resources-section {
        margin-bottom: 0px !important;
        /* Force layout to rely on next element's margin */
    }

    .final-cta {
        margin-top: 20px !important;
        /* Match grid gap exactly */
    }
}