/* TravelOrganizer Web - Stili */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.meta p {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    backdrop-filter: blur(10px);
}

section {
    padding: 30px 40px;
    border-bottom: 1px solid #eee;
}

section:last-of-type {
    border-bottom: none;
}

.note {
    background: #f8f9fa;
}

.note h2 {
    color: #1976d2;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.note p {
    line-height: 1.6;
    color: #555;
}

.totale {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    text-align: center;
}

.totale h2 {
    font-size: 1.3em;
    margin-bottom: 10px;
    opacity: 0.9;
}

.totale .importo {
    font-size: 3em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* Statistiche viaggio (totale previsto, pagato, residuo) */
.statistiche-viaggio .statistiche-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.statistiche-viaggio .stat-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(8px);
}

.statistiche-viaggio .stat-label {
    display: block;
    font-size: 0.9em;
    opacity: 0.95;
    margin-bottom: 6px;
}

.statistiche-viaggio .stat-value {
    font-size: 1.4em;
    font-weight: bold;
}

.statistiche-viaggio .stat-value.residuo {
    color: #ffeb3b;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
}

.sezione {
    background: white;
}

.sezione h2 {
    color: #1976d2;
    margin-bottom: 20px;
    font-size: 1.8em;
    border-bottom: 2px solid #e3f2fd;
    padding-bottom: 10px;
}

.items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid #1976d2;
    transition: transform 0.2s, box-shadow 0.2s;
}

.item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.item h3 {
    color: #1976d2;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.item p {
    margin: 5px 0;
    color: #666;
    font-size: 0.9em;
}

.item .data {
    color: #888;
    font-size: 0.85em;
}

.item .costo {
    color: #4caf50;
    font-weight: bold;
    font-size: 1.1em;
    margin-top: 10px;
}

footer {
    background: #f5f5f5;
    padding: 20px;
    text-align: center;
    color: #888;
    font-size: 0.9em;
}

footer .small {
    font-size: 0.8em;
    color: #bbb;
    margin-top: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header {
        padding: 30px 20px;
    }

    header h1 {
        font-size: 2em;
    }

    .meta {
        flex-direction: column;
        gap: 10px;
    }

    section {
        padding: 20px;
    }

    .items {
        grid-template-columns: 1fr;
    }

    .totale .importo {
        font-size: 2em;
    }
}

/* Commenti e Valutazioni */
.commenti-valutazioni {
    background: #f8f9fa;
}

.commenti-valutazioni h2 {
    color: #1976d2;
    margin-bottom: 30px;
}

.commenti-valutazioni h3 {
    color: #333;
    margin: 20px 0 15px 0;
    font-size: 1.3em;
}

/* Sezione Valutazioni */
.rating-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.rating-display {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.rating-average {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #1976d2;
}

.rating-count {
    color: #666;
    margin-bottom: 15px;
}

.stars-display {
    font-size: 1.5em;
    letter-spacing: 5px;
}

.stars-display .star.filled {
    opacity: 1;
}

.stars-display .star:not(.filled) {
    opacity: 0.3;
}

.no-ratings {
    color: #999;
    font-style: italic;
}

.rating-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.rating-form h4 {
    margin-bottom: 15px;
    color: #333;
}

.stars-input {
    display: flex;
    gap: 5px;
    margin: 10px 0;
    font-size: 2em;
    cursor: pointer;
}

.star-input {
    transition: opacity 0.2s, transform 0.2s;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    display: inline-block;
    opacity: 0.3;
}

.star-input:hover {
    transform: scale(1.2);
    opacity: 0.8 !important;
}

.star-input.selected {
    opacity: 1 !important;
}

/* Sezione Commenti */
.comments-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.comments-list {
    margin-bottom: 30px;
}

.no-comments {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
}

.comment-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #1976d2;
}

.comment-item.reply {
    margin-left: 30px;
    background: #fff;
    border-left-color: #4caf50;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.comment-header strong {
    color: #1976d2;
    font-size: 1.1em;
}

.comment-date {
    color: #999;
    font-size: 0.85em;
}

.comment-text {
    color: #333;
    line-height: 1.6;
    margin-bottom: 5px;
}

.comment-modified {
    color: #999;
    font-size: 0.85em;
    font-style: italic;
}

.btn-reply {
    background: #4caf50;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.2s;
}

.btn-reply:hover {
    background: #45a049;
}

.comment-replies {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.comment-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.comment-form h4 {
    margin-bottom: 15px;
    color: #333;
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

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

.btn-submit {
    background: #1976d2;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-submit:hover {
    background: #1565c0;
}

.btn-submit:active {
    transform: scale(0.98);
}

/* Responsive per commenti */
@media (max-width: 768px) {
    .comment-item.reply {
        margin-left: 15px;
    }
    
    .stars-input {
        font-size: 1.5em;
    }
    
    .rating-average {
        font-size: 1.2em;
    }
}

/* ============================================
   NAVIGATION & HEADER
   ============================================ */
.main-nav {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #1976d2;
    font-size: 1.5em;
    font-weight: bold;
    line-height: 1;
}

.nav-logo .logo-text {
    color: #1976d2;
    text-shadow: 0 2px 4px rgba(25, 118, 210, 0.2);
}

.logo-icon {
    font-size: 1.5em;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-menu a:hover {
    color: #1976d2;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    transition: all 0.3s;
}

/* ============================================
   FOOTER
   ============================================ */
.main-footer {
    background: #2c3e50;
    color: white;
    margin-top: 60px;
    padding: 40px 20px 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 15px;
    color: #fff;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: #1976d2;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    font-size: 1.5em;
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 20px;
    text-align: center;
    color: #95a5a6;
    font-size: 0.9em;
}

.footer-bottom .small {
    font-size: 0.8em;
    margin-top: 5px;
}

/* ============================================
   HOMEPAGE - HERO SECTION
   ============================================ */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-content {
    padding: 20px;
}

.hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.5em;
    margin-bottom: 20px;
    opacity: 0.95;
}

.hero-description {
    font-size: 1.1em;
    line-height: 1.8;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1em;
}

.btn-primary {
    background: #1976d2;
    color: white;
}

.btn-primary:hover {
    background: #1565c0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #667eea;
}

.btn-large {
    padding: 18px 40px;
    font-size: 1.1em;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-mockup {
    background: #2c3e50;
    border-radius: 30px;
    padding: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.phone-screen {
    background: white;
    border-radius: 20px;
    width: 280px;
    height: 500px;
    overflow: hidden;
    color: #333;
}

.app-preview {
    padding: 20px;
    height: 100%;
}

.preview-header {
    background: #1976d2;
    color: white;
    padding: 15px;
    margin: -20px -20px 20px -20px;
    text-align: center;
    font-weight: bold;
}

.preview-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.preview-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #1976d2;
}

/* ============================================
   HOMEPAGE - FEATURES SECTION
   ============================================ */
.features {
    padding: 80px 20px;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 50px;
    color: #1976d2;
}

.features-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 4px solid #1976d2;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 3em;
    margin-bottom: 20px;
}

.feature-card h3 {
    color: #1976d2;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* ============================================
   HOMEPAGE - SCREENSHOTS SECTION
   ============================================ */
.screenshots {
    padding: 80px 20px;
    background: #f8f9fa;
}

.screenshots-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.screenshot-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.screenshot-placeholder {
    aspect-ratio: 9/16;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2em;
    font-weight: bold;
}

/* ============================================
   HOMEPAGE - CTA SECTION
   ============================================ */
.cta {
    padding: 80px 20px;
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: white;
    text-align: center;
}

.cta h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

.cta p {
    font-size: 1.2em;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* ============================================
   PAGES - HEADER & CONTENT
   ============================================ */
.page-header {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
}

.page-header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    color: #fff;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.25);
}

.page-subtitle {
    font-size: 1.2em;
    opacity: 0.9;
    color: #fff;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);
}

.page-header .container {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.content-section {
    padding: 60px 20px;
    background: white;
}

.content-block {
    max-width: 800px;
    margin: 0 auto 40px;
}

.content-block h2 {
    color: #1976d2;
    margin-bottom: 20px;
    font-size: 2em;
}

.content-block h3 {
    color: #333;
    margin: 25px 0 15px;
    font-size: 1.5em;
}

.content-block p {
    line-height: 1.8;
    color: #555;
    margin-bottom: 15px;
}

.content-block ul {
    margin-left: 30px;
    margin-bottom: 20px;
    line-height: 1.8;
    color: #555;
}

.content-block li {
    margin-bottom: 10px;
}

.feature-list {
    list-style: none;
    margin-left: 0;
}

.feature-list li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

/* ============================================
   DOWNLOAD PAGE
   ============================================ */
.download-section {
    padding: 60px 20px;
    background: white;
}

.download-content {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.download-info h2 {
    color: #1976d2;
    margin-bottom: 20px;
    font-size: 2em;
}

.download-info p {
    line-height: 1.8;
    color: #555;
    margin-bottom: 30px;
}

.download-buttons {
    margin-bottom: 40px;
}

.qr-code-section {
    text-align: center;
}

.qr-code-section h3 {
    color: #1976d2;
    margin-bottom: 20px;
}

.qr-code-placeholder {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 12px;
    border: 2px dashed #ddd;
}

.qr-code-placeholder .small {
    font-size: 0.9em;
    color: #999;
    margin-top: 10px;
}

.requirements {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    border-top: 4px solid #4caf50;
}

.requirements h3 {
    color: #1976d2;
    margin-bottom: 20px;
}

.requirements-list {
    list-style: none;
    margin-left: 0;
}

.requirements-list li {
    padding: 8px 0;
    color: #555;
}

.features-preview {
    max-width: 1000px;
    margin: 0 auto;
    background: #f8f9fa;
    padding: 40px;
    border-radius: 12px;
}

.features-preview h3 {
    color: #1976d2;
    margin-bottom: 25px;
    text-align: center;
}

.features-grid-small {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.feature-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid #1976d2;
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */
@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 20px 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        padding: 15px 0;
        width: 100%;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .nav-container {
        height: 64px;
    }

    .nav-logo a {
        font-size: 1.2em;
        gap: 6px;
    }

    .logo-icon {
        font-size: 1.2em;
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 40px 20px;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5em;
    }

    .hero-subtitle {
        font-size: 1.2em;
    }

    .hero-buttons {
        justify-content: center;
    }

    .phone-mockup {
        display: none;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .screenshots-grid {
        grid-template-columns: 1fr;
    }

    .download-content {
        grid-template-columns: 1fr;
    }

    .features-grid-small {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .page-header h1 {
        font-size: 2em;
    }

    .section-title {
        font-size: 2em;
    }

    .cta h2 {
        font-size: 2em;
    }
}
