/*
Theme Name: Kayak Salento
Theme URI: https://kayaksalento.it
Author: CKCS Team
Author URI: https://kayaksalento.it
Description: Tema WordPress per Canoa Kayak Club Salento — Mediterranean Coastal Minimalism
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kayak-salento
Tags: one-column, custom-colors, custom-menu, featured-images, threaded-comments, translation-ready
*/

/*
=============================================================================
  KAYAK SALENTO — Main Stylesheet
  Mediterranean Coastal Minimalism
=============================================================================
*/

/* === RESET & BASE === */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Outfit', 'Montserrat', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #1a2b3c;
    background-color: #fbfdff;
    min-height: 100vh;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary);
}

ul, ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* === CSS CUSTOM PROPERTIES === */
:root {
    /* Colors — Mediterranean Coastal */
    --background: #fbfdff;
    --background-alt: #fdf8f5;
    --foreground: #1a2b3c;
    --primary: #1a6fa0;
    --primary-foreground: #ffffff;
    --accent: #2ec4b6;
    --accent-foreground: #ffffff;
    --muted: #f5efe8;
    --muted-foreground: #6b7f8e;
    --card: #fcf9f6;
    --card-foreground: #1e3044;
    --border: #c8d8e4;
    --ring: #2ec4b6;
    --destructive: #d94040;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

    /* Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;

    /* Layout */
    --header-height: 64px;
    --container-max: 1200px;
    --section-padding: 6rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
}

/* === UTILITY === */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

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

.max-w-4xl {
    max-width: 56rem;
    margin-left: auto;
    margin-right: auto;
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    text-decoration: none;
}

.btn svg {
    flex-shrink: 0;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

.btn-primary:hover {
    background-color: #15608a;
    color: var(--primary-foreground);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    color: var(--foreground);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background-color: var(--muted);
    color: var(--primary);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.0625rem;
}

/* === HEADER === */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(251, 253, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: all var(--transition-base);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--foreground);
    text-decoration: none;
}

.site-logo:hover {
    color: var(--primary);
}

.logo-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-initials {
    color: #fff;
    font-weight: 700;
    font-size: 1.125rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-weight: 600;
    font-size: 1.125rem;
    line-height: 1.2;
    color: var(--foreground);
}

.logo-tagline {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    line-height: 1;
}

/* Desktop Navigation */
.primary-nav {
    display: none;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-menu li a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Language Toggle */
.lang-toggle-btn {
    display: none; /* hidden on mobile, shown on desktop */
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.625rem;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--foreground);
    transition: all var(--transition-fast);
}

.lang-toggle-btn:hover {
    background-color: var(--muted);
    color: var(--primary);
    border-color: var(--primary);
}

.lang-toggle-btn svg {
    flex-shrink: 0;
}

.lang-toggle-mobile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    color: var(--muted-foreground);
    transition: color var(--transition-fast);
}

.lang-toggle-mobile:hover {
    color: var(--primary);
}

@media (min-width: 1024px) {
    .lang-toggle-btn {
        display: flex;
    }
    .lang-toggle-mobile {
        display: none;
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--foreground);
}

.mobile-menu-toggle:hover {
    color: var(--primary);
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 24px;
}

.hamburger-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: currentColor;
    border-radius: 2px;
    transition: all var(--transition-fast);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-icon span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    border-top: 1px solid var(--border);
    background-color: var(--background);
    padding: 1rem;
}

.mobile-nav.is-open {
    display: block;
}

.mobile-nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mobile-nav-menu li a {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--foreground);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.mobile-nav-menu li a:hover,
.mobile-nav-menu li a.active {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

/* Desktop breakpoint */
@media (min-width: 1024px) {
    .primary-nav {
        display: block;
    }
    .mobile-menu-toggle {
        display: none;
    }
}

/* === SECTIONS === */
.section {
    padding-top: var(--section-padding);
    padding-bottom: var(--section-padding);
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
    color: var(--foreground);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.section-text {
    font-size: 1.0625rem;
    color: var(--muted-foreground);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.section-header {
    margin-bottom: 3rem;
}

.section-content {
    padding: 2rem 0;
}

/* === HERO === */
.section-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: var(--header-height);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(251, 253, 255, 0.5),
        transparent,
        rgba(251, 253, 255, 0.7)
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem 1rem;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--foreground);
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    color: var(--muted-foreground);
    margin-bottom: 0.5rem;
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--muted-foreground);
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted-foreground);
    font-size: 0.8125rem;
    text-decoration: none;
    animation: bounce-down 2s ease-in-out infinite;
}

.hero-scroll-indicator:hover {
    color: var(--primary);
}

@keyframes bounce-down {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* === ABOUT === */
.section-about {
    background-color: var(--background-alt);
}

/* === SERVICES === */
.section-services {
    background-color: var(--background);
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.service-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
}

.service-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.service-card-image {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, var(--muted), var(--background));
    overflow: hidden;
}

.service-icon-circle {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(26, 111, 160, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.service-card-body {
    padding: 1.25rem;
}

.service-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--card-foreground);
}

.service-card-desc {
    font-size: 0.9375rem;
    color: var(--muted-foreground);
    line-height: 1.6;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* === EVENTS === */
.section-events {
    background-color: var(--background-alt);
}

.events-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.event-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
}

.event-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.event-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background-color: var(--muted);
}

.event-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.event-card:hover .event-card-image img {
    transform: scale(1.05);
}

.event-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(251, 253, 255, 0.9) 0%, transparent 60%);
}

.event-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    border: 1px solid;
}

.event-badge-escursion {
    background-color: rgba(46, 196, 182, 0.2);
    color: #0d9488;
    border-color: rgba(46, 196, 182, 0.3);
}

.event-badge-course {
    background-color: rgba(26, 111, 160, 0.2);
    color: var(--primary);
    border-color: rgba(26, 111, 160, 0.3);
}

.event-badge-training {
    background-color: rgba(100, 116, 139, 0.2);
    color: #475569;
    border-color: rgba(100, 116, 139, 0.3);
}

.event-badge-social {
    background-color: var(--muted);
    color: var(--muted-foreground);
    border-color: var(--border);
}

.event-date {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--muted-foreground);
}

.event-card-body {
    padding: 1.25rem;
}

.event-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--card-foreground);
}

.event-card-desc {
    font-size: 0.9375rem;
    color: var(--muted-foreground);
    line-height: 1.6;
}

.no-events {
    grid-column: 1 / -1;
    padding: 3rem 0;
    color: var(--muted-foreground);
}

@media (min-width: 768px) {
    .events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .events-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* === GALLERY === */
.section-gallery {
    background-color: var(--background);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
}

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

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26, 43, 60, 0.9), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

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

.gallery-item-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    transform: translateY(100%);
    transition: transform var(--transition-base);
}

.gallery-item:hover .gallery-item-title {
    transform: translateY(0);
}

.gallery-placeholder {
    background: linear-gradient(135deg, var(--muted), var(--card));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* === FAQ === */
.section-faq {
    background-color: var(--background-alt);
}

.faq-list {
    max-width: 48rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: var(--card);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: 1rem 1.25rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1.0625rem;
    font-weight: 500;
    color: var(--card-foreground);
    text-align: left;
    transition: color var(--transition-fast);
}

.faq-question:hover {
    color: var(--primary);
}

.faq-question[aria-expanded="true"] {
    color: var(--primary);
}

.faq-chevron {
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.faq-question[aria-expanded="true"] .faq-chevron {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base);
}

.faq-answer.is-open {
    max-height: 500px;
}

.faq-answer-inner {
    padding: 0 1.25rem 1rem;
    font-size: 0.9375rem;
    color: var(--muted-foreground);
    line-height: 1.7;
}

.faq-answer-inner p {
    margin-bottom: 0;
}

/* === CONTACT === */
.section-contact {
    background-color: var(--background-alt);
}

.contact-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.contact-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
}

.contact-card-icon {
    color: var(--primary);
    margin-bottom: 1rem;
}

.contact-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--card-foreground);
}

.contact-card a {
    display: block;
    color: var(--muted-foreground);
    font-size: 0.9375rem;
    transition: color var(--transition-fast);
}

.contact-card a:hover {
    color: var(--primary);
}

@media (min-width: 768px) {
    .contact-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Contact Form */
.contact-form-wrapper {
    max-width: 36rem;
    margin: 0 auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
}

.form-group input,
.form-group textarea {
    font-family: inherit;
    font-size: 0.9375rem;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--background);
    color: var(--foreground);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--ring);
    box-shadow: 0 0 0 3px rgba(46, 196, 182, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-message {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    display: none;
}

.form-message.is-success {
    display: block;
    background-color: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.form-message.is-error {
    display: block;
    background-color: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === FOOTER === */
.site-footer {
    background-color: var(--card);
    border-top: 1px solid var(--border);
    padding-top: 3rem;
    padding-bottom: 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
}

.footer-col {
    /* default: full width */
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    line-height: 1.7;
}

.footer-heading {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--foreground);
}

.footer-contact-info p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 0.25rem;
}

.footer-contact-info a {
    color: var(--muted-foreground);
    transition: color var(--transition-fast);
}

.footer-contact-info a:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-foreground);
    transition: all var(--transition-fast);
}

.social-link:hover {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: var(--muted-foreground);
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* === WORDPRESS DEFAULT OVERRIDES === */
.aligncenter {
    margin-left: auto;
    margin-right: auto;
}

.alignleft {
    float: left;
    margin-right: 1.5rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 0.8125rem;
    color: var(--muted-foreground);
    text-align: center;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}
