/* Premium Design System for Milano (Italian Theme) */
:root {
    --bg-primary: #fdfdfb; /* Off-white background */
    --text-primary: #1a1a1a; /* Anthracite body text */
    --text-secondary: #5a5d5a; /* Balanced gray-anthracite */
    
    /* Italian Flag Colors */
    --color-green: #008c45;
    --color-white: #ffffff;
    --color-red: #cd212a;
    
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', system-ui, sans-serif;
    
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --border-glass: 1px solid rgba(197, 160, 89, 0.15);
    --shadow-glass: 0 15px 35px rgba(26, 26, 26, 0.05);
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* Top Italian Bar */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    display: flex;
    z-index: 100;
}

.top-bar .segment {
    flex: 1;
    height: 100%;
}

.top-bar .green { background-color: var(--color-green); }
.top-bar .white { background-color: var(--color-white); }
.top-bar .red { background-color: var(--color-red); }

/* Background Ambient Glows (Subtle green and red hints) */
.bg-glow {
    position: absolute;
    width: 70vw;
    height: 70vw;
    max-width: 600px;
    max-height: 600px;
    border-radius: 50%;
    filter: blur(140px);
    pointer-events: none;
    z-index: 1;
}

.bg-glow-1 {
    top: -15%;
    left: -15%;
    background: radial-gradient(circle, var(--color-green) 0%, transparent 70%);
    opacity: 0.06;
}

.bg-glow-2 {
    bottom: -15%;
    right: -15%;
    background: radial-gradient(circle, var(--color-red) 0%, transparent 70%);
    opacity: 0.05;
}

/* Main Container Layout - Fail-safe Centering */
.container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 550px; /* Elegant centered column */
    margin: auto auto; /* Perfect horizontal & vertical centering without clipping */
    padding: 3rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3rem; /* Dynamic gap between Header, Main and Footer */
    text-align: center;
    box-sizing: border-box;
}

/* Header & Logo styling */
.header {
    width: 100%;
    display: flex;
    justify-content: center;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.logo {
    max-width: 220px;
    width: 100%;
    height: auto;
    object-fit: contain;
    transition: var(--transition-smooth);
    filter: drop-shadow(0 4px 10px rgba(26, 26, 26, 0.04));
}

.logo:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 6px 15px rgba(0, 140, 69, 0.08));
}

/* Main Content Area */
.main-content {
    width: 100%;
    max-width: 100%;
    text-align: center;
}

.title {
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 8vw, 3.2rem); /* Dynamic, fits all screens */
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.text-green {
    color: var(--color-green);
}

.text-red {
    color: var(--color-red);
}

/* Elegant Italian Divider under text */
.italian-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 120px;
    height: 3px;
    margin: 2rem auto 0 auto;
    border-radius: 2px;
    overflow: hidden;
}

.italian-divider .line {
    flex: 1;
    height: 100%;
}

.italian-divider .green { background-color: var(--color-green); }
.italian-divider .red { background-color: var(--color-red); }

/* Card and button styles for redirect and order pages */
.info-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: var(--border-glass);
    border-radius: 24px;
    padding: 2.25rem 2rem;
    box-shadow: var(--shadow-glass);
    width: 100%;
    margin-top: 2rem;
    box-sizing: border-box;
    transition: var(--transition-smooth);
}

.info-card:hover {
    border-color: rgba(197, 160, 89, 0.3);
    box-shadow: 0 20px 45px rgba(26, 26, 26, 0.08);
}

.info-card h3 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.info-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.btn-primary {
    background: var(--color-green);
    color: #ffffff;
    border: none;
    outline: none;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.85rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    text-decoration: none;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(0, 140, 69, 0.15);
}

.btn-primary:hover {
    background: #007339;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 140, 69, 0.25);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(205, 33, 42, 0.05);
    color: var(--color-red);
    border: 1px solid rgba(205, 33, 42, 0.2);
    outline: none;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.85rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.btn-secondary:hover {
    background: rgba(205, 33, 42, 0.1);
    border-color: rgba(205, 33, 42, 0.4);
    transform: translateY(-2px);
}

.btn-secondary:active {
    transform: translateY(0);
}

.btn-icon {
    transition: var(--transition-smooth);
}

.btn-primary:hover .btn-icon {
    transform: translate(2px, -2px);
}

/* Loading Animation for Redirect */
.redirect-loader {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 1.5rem auto;
}

.redirect-loader span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: bounce 1.2s infinite ease-in-out both;
}

.redirect-loader span:nth-child(1) {
    background-color: var(--color-green);
    animation-delay: -0.32s;
}

.redirect-loader span:nth-child(2) {
    background-color: var(--color-white);
    border: 1px solid rgba(26, 26, 26, 0.15);
    animation-delay: -0.16s;
}

.redirect-loader span:nth-child(3) {
    background-color: var(--color-red);
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0.3);
        opacity: 0.3;
    }
    40% {
        transform: scale(1.0);
        opacity: 1;
    }
}

/* Footer Section */
.footer {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.contact-info {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
}

.contact-link {
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition-smooth);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

a.contact-link:hover {
    color: var(--color-green);
    background: rgba(0, 140, 69, 0.05);
}

.contact-icon {
    color: var(--color-green);
}

.divider {
    color: rgba(26, 26, 26, 0.15);
}

.copyright {
    font-size: 0.75rem;
    color: rgba(26, 26, 26, 0.4);
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-up {
    animation: slideUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.15s;
    opacity: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments for Mobile compatibility */
@media (max-width: 600px) {
    .container {
        padding: 2rem 1.25rem;
        gap: 2rem;
    }
    
    .logo {
        max-width: 160px; /* Elegant small logo for mobile */
    }
    
    .title {
        font-size: clamp(1.85rem, 8vw, 2.4rem); /* Balanced wrapping on mobile */
    }

    .info-card {
        padding: 1.75rem 1.25rem;
        border-radius: 20px;
    }

    .info-card h3 {
        font-size: 1.25rem;
    }

    .btn-primary, .btn-secondary {
        font-size: 0.85rem;
        padding: 0.8rem 1.2rem;
        border-radius: 10px;
        width: 100%; /* Fail-safe full width buttons */
    }
    
    .contact-info {
        flex-direction: column;
        gap: 0.4rem;
    }
    
    .divider {
        display: none;
    }
}
