/**
 * Costantino Tour v2 - Design System "Vibrant Marine"
 */

/* ==========================================================================
   Stili Base & Reset
   ========================================================================== */
body {
    font-family: var(--font-body);
    color: #333333;
    background-color: #f7fafc;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-title);
    font-weight: 700;
    color: var(--primary-color);
}

.text-justify {
    text-align: justify;
}

/* ==========================================================================
   Navbar & Top Bar
   ========================================================================== */
.top-bar {
    font-size: 13px;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.navbar {
    transition: all 0.3s ease;
}

.navbar-brand img {
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    color: #495057;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 15px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: calc(100% - 30px);
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* ==========================================================================
   Hero Section & Box Meteo
   ========================================================================== */
.hero-section {
    background: linear-gradient(135deg, rgba(15, 59, 95, 0.9) 0%, rgba(8, 34, 56, 0.7) 100%), 
                url('../images/tremiti_hero.webp') no-repeat center center/cover;
    min-height: 85vh;
    display: flex;
    align-items: center;
    color: white;
    position: relative;
}

/* Meteo Card - Glassmorphism */
.meteo-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.meteo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   Bottoni Premium
   ========================================================================== */
.btn-premium {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    padding: 12px 30px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(255, 111, 60, 0.4);
    transition: all 0.3s ease;
}

.btn-premium:hover {
    background-color: #e05626;
    border-color: #e05626;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 111, 60, 0.6);
}

.btn-outline-premium {
    border: 2px solid var(--secondary-color);
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    padding: 10px 25px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-outline-premium:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
}

/* ==========================================================================
   Tours Cards
   ========================================================================== */
.tour-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.tour-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.tour-img-wrapper {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.tour-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.tour-card:hover .tour-img-wrapper img {
    transform: scale(1.08);
}

.tour-price-badge {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background-color: var(--primary-color);
    color: white;
    padding: 6px 15px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.tour-features-list span {
    background-color: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 50px;
    display: inline-block;
    margin: 2px;
}

/* ==========================================================================
   Masonry Grid Galleria
   ========================================================================== */
.masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-auto-rows: 240px;
    grid-gap: 15px;
    grid-auto-flow: dense;
}

.masonry-item {
    overflow: hidden;
    border-radius: 16px;
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.masonry-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.masonry-item:hover img {
    transform: scale(1.06);
}

.masonry-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(15, 59, 95, 0.8) 0%, rgba(15, 59, 95, 0) 70%);
    opacity: 0;
    display: flex;
    align-items: flex-end;
    padding: 20px;
    transition: opacity 0.3s ease;
}

.masonry-item:hover .masonry-overlay {
    opacity: 1;
}

.masonry-overlay span {
    color: white;
    font-weight: 600;
    font-size: 14px;
}

/* Dimensioni degli elementi Masonry */
@media (min-width: 768px) {
    .masonry-item.w-2 {
        grid-column: span 2;
    }
    .masonry-item.h-2 {
        grid-row: span 2;
    }
    .masonry-item.w-2.h-2 {
        grid-column: span 2;
        grid-row: span 2;
    }
}

/* ==========================================================================
   Contatti e Form
   ========================================================================== */
.contact-info-card {
    background-color: white;
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.02);
    border: 1px solid rgba(0,0,0,0.04);
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.25rem rgba(0, 168, 204, 0.15);
}

/* ==========================================================================
   Blog & Articoli
   ========================================================================== */
.blog-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.02);
    border: 1px solid rgba(0,0,0,0.04);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.06);
}

/* ==========================================================================
   Chatbot Widget Premium
   ========================================================================== */
#chatbot-window {
    animation: zoomInChat 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes zoomInChat {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.chatbot-msg.user {
    text-align: right;
}

.chatbot-msg.user .msg-content {
    background-color: var(--secondary-color);
    color: white;
    border-bottom-right-radius: 4px;
}

.chatbot-msg.bot .msg-content {
    background-color: white;
    color: #333333;
    border-bottom-left-radius: 4px;
}

.chatbot-msg .msg-content {
    padding: 10px 15px;
    border-radius: 16px;
    max-width: 85%;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    word-break: break-word;
}

/* Animazione indicatore di scrittura */
.typing-dots span {
    width: 6px;
    height: 6px;
    background-color: #888;
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
    animation: bounceTyping 1.4s infinite both;
}

.typing-dots span:nth-child(2) { animation-delay: .2s; }
.typing-dots span:nth-child(3) { animation-delay: .4s; }

@keyframes bounceTyping {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}
