/* styles.css - Stile Salentino per Salentix */

@import url('https://fonts.googleapis.com/css2?family=Fredoka+One:wght@400&family=Open+Sans:wght@300;400;600;700&display=swap');

:root {
    --salento-rosso: #d32f2f;
    --salento-giallo: #ffc107;
    --salento-blu: #1976d2;
    --salento-verde: #388e3c;
    --salento-arancio: #ff8f00;
    --salento-crema: #fff8e1;
    --salento-terra: #8d6e63;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    background: linear-gradient(135deg, var(--salento-crema) 0%, #ffffff 50%, var(--salento-blu) 100%);
    background-attachment: fixed;
    color: #333;
    line-height: 1.6;
}

/* Header con stile barocco salentino */
header {
    background: linear-gradient(45deg, var(--salento-rosso), var(--salento-arancio), var(--salento-giallo));
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    color: white;
    padding: 100px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="70" cy="70" r="2.5" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    animation: sparkle 15s linear infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes sparkle {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-100px) translateY(-100px); }
}

header h1 {
    font-family: 'Fredoka One', cursive;
    font-size: 4rem;
    font-weight: 400;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

header p {
    font-size: 1.4rem;
    font-weight: 300;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
}

/* Immagine hero con effetti salentini */
.hero-img {
    max-width: 300px;
    height: auto;
    border-radius: 50%;
    border: 8px solid var(--salento-giallo);
    box-shadow: 0 0 30px rgba(255, 193, 7, 0.6), 0 0 60px rgba(211, 47, 47, 0.4);
    animation: float 4s ease-in-out infinite, glow 3s ease-in-out infinite alternate;
    position: relative;
    z-index: 2;
}

@keyframes float {
    0%, 100% { transform: translatey(0px) rotate(0deg); }
    25% { transform: translatey(-15px) rotate(1deg); }
    50% { transform: translatey(-10px) rotate(0deg); }
    75% { transform: translatey(-20px) rotate(-1deg); }
}

@keyframes glow {
    from { box-shadow: 0 0 30px rgba(255, 193, 7, 0.6), 0 0 60px rgba(211, 47, 47, 0.4); }
    to { box-shadow: 0 0 40px rgba(255, 193, 7, 0.8), 0 0 80px rgba(211, 47, 47, 0.6); }
}

/* Sezioni con stile mediterraneo */
section {
    padding: 80px 20px;
    position: relative;
}

section h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 2.5rem;
    color: var(--salento-rosso);
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

section p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    max-width: 800px;
    margin: 0 auto;
}

.creator-info {
    font-style: italic;
    color: var(--salento-blu);
    font-size: 1rem;
    margin-top: 15px;
    text-align: center;
    padding: 8px 15px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    display: inline-block;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Card delle storie con decorazioni barocche */
.stories {
    background: linear-gradient(135deg, #ffffff 0%, var(--salento-crema) 100%);
    border-radius: 25px;
    padding: 50px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1), 0 5px 15px rgba(0,0,0,0.07);
    border: 3px solid var(--salento-giallo);
    position: relative;
    overflow: hidden;
}

.stories::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,193,7,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.stories h2,
.stories p,
.stories button {
    position: relative;
    z-index: 2;
}

/* Bottone con stile salentino */
.btn-salentino {
    background: linear-gradient(45deg, var(--salento-rosso), var(--salento-arancio));
    border: none;
    color: white;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(211, 47, 47, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-salentino:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(211, 47, 47, 0.4);
    background: linear-gradient(45deg, var(--salento-arancio), var(--salento-giallo));
}

.btn-salentino::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn-salentino:hover::before {
    left: 100%;
}

/* Footer con motivi tradizionali */
footer {
    background: linear-gradient(135deg, var(--salento-rosso) 0%, var(--salento-terra) 100%);
    color: white;
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: repeating-linear-gradient(
        90deg,
        var(--salento-giallo) 0px,
        var(--salento-giallo) 20px,
        var(--salento-rosso) 20px,
        var(--salento-rosso) 40px
    );
}

footer p {
    font-size: 1rem;
    margin: 0;
    position: relative;
    z-index: 2;
}

/* Decorazioni aggiuntive */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Stile per la navigazione principale */
.main-nav {
    margin-top: 20px;
    position: relative;
    z-index: 10;
}

.main-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    gap: 20px;
}

.main-nav li {
    position: relative;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 8px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
    background-color: rgba(0, 0, 0, 0.2);
    display: inline-block;
}

.main-nav a:hover, .main-nav a.active {
    background-color: var(--salento-giallo);
    color: var(--salento-rosso);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.main-nav a.active {
    font-weight: 700;
    position: relative;
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background-color: var(--salento-rosso);
    border-radius: 50%;
}

/* Responsive design */
/* Tablet: 2 colonne per il menu */
@media (min-width: 481px) and (max-width: 1023px) {
    .main-nav ul {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .main-nav a {
        font-size: 1rem;
        padding: 10px 15px;
        text-align: center;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2.5rem;
    }
    
    header p {
        font-size: 1.1rem;
    }
    
    .hero-img {
        max-width: 200px;
    }
    
    section {
        padding: 50px 15px;
    }
    
    section h2 {
        font-size: 2rem;
    }
    
    .stories {
        padding: 30px 20px;
        border-radius: 15px;
    }
}

/* Smartphone: 2 colonne per il menu */
@media (max-width: 480px) {
    header {
        padding: 60px 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .hero-img {
        max-width: 150px;
    }
    
    .btn-salentino {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    .main-nav ul {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        max-width: 320px;
        margin: 0 auto;
    }
    
    .main-nav a {
        font-size: 0.9rem;
        padding: 8px 10px;
        text-align: center;
    }
}