/**
 * Visita Termoli - Main CSS
 * 
 * Modern, responsive design inspired by Termoli
 */

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body), sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-headings), serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5em;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--color-secondary);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--color-primary);
    color: #fff;
    padding: 10px 20px;
    z-index: 10000;
}

.skip-link:focus {
    top: 0;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: transform 0.3s;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo img {
    height: 50px;
    width: auto;
}

.logo-text {
    font-family: var(--font-headings);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* Navigation */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    color: var(--color-text);
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: background 0.3s, color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    background: var(--color-primary);
    color: #fff;
}

/* Dropdown */
.nav-item.has-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: var(--border-radius);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s;
    list-style: none;
    padding: 10px 0;
}

.nav-item.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--color-text);
}

.dropdown-menu a:hover {
    background: var(--color-sand);
    color: var(--color-primary);
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: 5px;
}

.lang-switcher a {
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text);
    border-radius: 4px;
    transition: background 0.3s;
}

.lang-switcher a:hover,
.lang-switcher a.active {
    background: var(--color-primary);
    color: #fff;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--color-text);
    transition: 0.3s;
}

@media (max-width: 991px) {
    .main-nav {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        bottom: 0;
        background: #fff;
        padding: 20px;
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .main-nav.open {
        transform: translateX(0);
    }

    .nav-menu {
        flex-direction: column;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .lang-switcher {
        display: none;
    }
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.7);
}

.hero-content {
    position: relative;
    text-align: center;
    color: #fff;
    padding: 40px;
    max-width: 800px;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    text-shadow: 2px 4px 20px rgba(0, 0, 0, 0.4);
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 30px;
    opacity: 0.95;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    font-weight: 600;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(30, 95, 168, 0.3);
}

.btn-accent {
    background: var(--color-accent);
    color: #fff;
}

.btn-accent:hover {
    background: #c96b15;
}

.btn-outline {
    background: transparent;
    border: 2px solid currentColor;
}

/* Cards */
.card {
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-default);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.card-image {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

/* Grid */
.grid {
    display: grid;
    gap: 30px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Sections */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--color-primary);
}

.section-title p {
    max-width: 600px;
    margin: 15px auto 0;
    color: #666;
}

.section-sand {
    background: var(--color-sand);
}

/* Footer */
.site-footer {
    background: var(--color-footer-bg, #2c3e50);
    color: var(--color-footer-text, #fff);
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-links,
.footer-contact {
    list-style: none;
}

.footer-links li,
.footer-contact li {
    margin-bottom: 10px;
}

.footer-links a,
.footer-contact a {
    color: inherit;
    opacity: 0.8;
}

.footer-links a:hover,
.footer-contact a:hover {
    opacity: 1;
}

.footer-contact i {
    width: 20px;
    margin-right: 8px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
    border-radius: 50%;
    font-size: 18px;
    transition: background 0.3s, transform 0.3s;
}

.social-links a:hover {
    background: var(--color-primary);
    transform: scale(1.1);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
    font-size: 14px;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: calc(var(--back-to-top-bottom, 20) * 1px);
    right: calc(var(--back-to-top-right, 20) * 1px);
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    background: var(--color-secondary);
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-primary {
    color: var(--color-primary);
}

.text-accent {
    color: var(--color-accent);
}

.mb-0 {
    margin-bottom: 0;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-4 {
    margin-bottom: 2rem;
}