/*
Theme Name: Divi Tour Navarre Child
Theme URI: https://tournavarre.com/
Description: Custom child theme for Tour Navarre with modern enhancements.
Author: Gemini AI
Author URI: https://gemini.google.com/
Template: Divi
Version: 1.0.0
Text Domain: divi-tournavarre-child
*/

/* --- Divi Parent Theme Import --- */
@import url("../Divi/style.css");

/* --- Custom Theme Colors & Typography --- */
:root {
    --color-emerald: #00A896;
    --color-sand: #F5F5F5;
    --color-deep-sea: #013A63;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
}

body {
    font-family: var(--font-body);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

/* --- Global Divi Module Overrides --- */
.et_pb_section {
    padding-top: 60px !important;
    padding-bottom: 60px !important;
}

/* --- Header / Navigation Enhancements --- */
#main-header {
    transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

/* Make header initially transparent */
.et-fixed-header#main-header {
    background-color: var(--color-deep-sea) !important; /* Solid on scroll */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.et_pb_menu_0 .et_pb_button {
    background-color: var(--color-emerald) !important;
    border-radius: 9999px !important; /* Pill shape */
    padding: 10px 25px !important;
    font-weight: bold;
    text-transform: capitalize;
    letter-spacing: normal !important;
    transition: background-color 0.3s ease;
}

.et_pb_menu_0 .et_pb_button:hover {
    background-color: #007A6F !important; /* Slightly darker emerald on hover */
}

/* --- Hero Smart Search --- */
.tournavarre-search-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.tournavarre-search-input {
    width: 100%;
    padding: 15px 120px 15px 30px; /* Adjust padding for button */
    border-radius: 9999px;
    border: none;
    font-size: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    background-color: white;
    outline: none;
    transition: box-shadow 0.3s ease;
    color: #333;
}

.tournavarre-search-input::placeholder {
    color: #999;
}

.tournavarre-search-input:focus {
    box-shadow: 0 10px 30px rgba(0,0,0,0.2), 0 0 0 4px rgba(0,168,150,0.2); /* Emerald ring */
}

.tournavarre-search-button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--color-deep-sea);
    color: white;
    padding: 10px 25px;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.tournavarre-search-button:hover {
    background-color: #002D4F;
}

.tournavarre-suggestions {
    position: absolute;
    width: calc(100% - 20px); /* Adjust for padding */
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-top: 10px;
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
    left: 10px; /* Align with input */
    right: 10px;
    display: none; /* Hidden by default */
}

.tournavarre-suggestions-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #eee;
    color: #333;
}

.tournavarre-suggestions-item:last-child {
    border-bottom: none;
}

.tournavarre-suggestions-item:hover {
    background-color: var(--color-sand);
}

/* --- Masonry Grid & Filters --- */
.tournavarre-filter-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.tournavarre-filter-button {
    background-color: var(--color-sand);
    color: var(--color-deep-sea);
    padding: 10px 25px;
    border-radius: 9999px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: none;
}

.tournavarre-filter-button.active,
.tournavarre-filter-button:hover {
    background-color: var(--color-emerald);
    color: white;
}

.tournavarre-masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-gap: 20px;
    /* This next line helps with actual masonry effect, but complex with pure CSS.
       JavaScript will fine-tune element positions for true masonry. */
    grid-auto-rows: minmax(auto, auto); /* Allows items to fill space */
}

.tournavarre-grid-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    background-color: white;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.tournavarre-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.tournavarre-grid-item img {
    width: 100%;
    height: 250px; /* Fixed height for consistency, adjust as needed */
    object-fit: cover;
    transition: transform 0.5s ease-in-out;
}

.tournavarre-grid-item:hover img {
    transform: scale(1.08);
}

.tournavarre-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--color-deep-sea) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    color: white;
}

.tournavarre-grid-item:hover .tournavarre-item-overlay {
    opacity: 1;
}

.tournavarre-item-title {
    font-family: var(--font-heading);
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 10px;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
    transition-delay: 0.1s;
}

.tournavarre-grid-item:hover .tournavarre-item-title {
    transform: translateY(0);
    opacity: 1;
}

.tournavarre-item-category {
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 5px;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
    transition-delay: 0.05s;
}

.tournavarre-grid-item:hover .tournavarre-item-category {
    transform: translateY(0);
    opacity: 1;
}

.tournavarre-item-cta {
    background-color: var(--color-emerald);
    color: white;
    padding: 10px 20px;
    border-radius: 9999px;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    margin-top: 15px;
    display: inline-block;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease, background-color 0.3s ease;
    transition-delay: 0.15s;
}

.tournavarre-grid-item:hover .tournavarre-item-cta {
    transform: translateY(0);
    opacity: 1;
}

.tournavarre-item-cta:hover {
    background-color: #007A6F;
}

/* --- Top Rated Tours Sidebar Widget --- */
.tournavarre-tours-widget {
    background-color: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.tournavarre-tours-widget h4 {
    font-family: var(--font-heading);
    font-size: 1.4em;
    color: var(--color-deep-sea);
    margin-bottom: 20px;
}

.tournavarre-tour-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-sand);
}

.tournavarre-tour-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.tournavarre-tour-thumb {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
}

.tournavarre-tour-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tournavarre-tour-details {
    flex-grow: 1;
}

.tournavarre-tour-details h5 {
    font-family: var(--font-heading);
    font-size: 1em;
    margin-bottom: 5px;
    color: var(--color-deep-sea);
}

.tournavarre-tour-rating {
    display: flex;
    align-items: center;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.tournavarre-tour-rating .star {
    color: gold; /* Or a custom star icon */
    margin-right: 3px;
}

.tournavarre-tour-price {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--color-emerald);
}

.tournavarre-tour-cta {
    background-color: var(--color-sand);
    color: var(--color-deep-sea);
    padding: 8px 15px;
    border-radius: 9999px;
    font-size: 0.9em;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
    white-space: nowrap; /* Keep button from wrapping */
}

.tournavarre-tour-cta:hover {
    background-color: var(--color-emerald);
    color: white;
}

/* Custom Itinerary Button */
.tournavarre-custom-itinerary {
    background-color: var(--color-deep-sea);
    color: white;
    padding: 12px 25px;
    border-radius: 9999px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    display: block;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}

.tournavarre-custom-itinerary:hover {
    background-color: #002D4F;
}

/* Planning a Trip button */
.tournavarre-planning-trip {
    background-color: rgba(0,168,150,0.1); /* Light emerald background */
    color: var(--color-emerald);
    padding: 12px 25px;
    border-radius: 9999px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    display: block;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}

.tournavarre-planning-trip:hover {
    background-color: rgba(0,168,150,0.2);
}

/* --- Footer --- */
#main-footer {
    background-color: var(--color-deep-sea) !important;
    color: white !important;
    padding: 80px 0 !important;
    font-family: var(--font-body);
}

#main-footer .footer-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

#main-footer .footer-column h4 {
    font-family: var(--font-heading);
    font-size: 1.3em;
    color: var(--color-emerald);
    margin-bottom: 25px;
}

#main-footer .footer-column p {
    font-size: 0.9em;
    line-height: 1.6;
    color: rgba(255,255,255,0.8);
}

#main-footer .footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#main-footer .footer-column ul li {
    margin-bottom: 12px;
}

#main-footer .footer-column ul li a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.2s ease;
}

#main-footer .footer-column ul li a:hover {
    color: var(--color-emerald);
}

/* Footer Newsletter */
.tournavarre-newsletter-form {
    display: flex;
    margin-top: 15px;
}

.tournavarre-newsletter-input {
    flex-grow: 1;
    padding: 12px 20px;
    border-radius: 9999px 0 0 9999px;
    border: none;
    outline: none;
    background-color: rgba(255,255,255,0.1);
    color: white;
}

.tournavarre-newsletter-input::placeholder {
    color: rgba(255,255,255,0.6);
}

.tournavarre-newsletter-submit {
    background-color: var(--color-emerald);
    color: white;
    padding: 12px 25px;
    border-radius: 0 9999px 9999px 0;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.tournavarre-newsletter-submit:hover {
    background-color: #007A6F;
}

/* Copyright & Privacy */
#et-info {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 25px;
    margin-top: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8em;
    color: rgba(255,255,255,0.6);
}

#et-info a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    margin-left: 15px;
    transition: color 0.2s ease;
}

#et-info a:hover {
    color: var(--color-emerald);
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .tournavarre-search-input {
        padding: 12px 100px 12px 20px;
        font-size: 14px;
    }
    .tournavarre-search-button {
        padding: 8px 18px;
        font-size: 14px;
    }
    .tournavarre-filter-buttons {
        flex-wrap: wrap;
    }
    .tournavarre-masonry-grid {
        grid-template-columns: 1fr;
    }
    #main-footer .footer-columns {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .tournavarre-newsletter-form {
        justify-content: center;
    }
    #et-info {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    #et-info #footer-info, #et-info .et-social-icon {
        width: 100%;
    }
}