/* Font Classes */
.splash-regular {
    font-family: "Splash", cursive;
    font-weight: 400;
    font-style: normal;
}

.faculty-glyphic-regular {
    font-family: "Faculty Glyphic", sans-serif;
    font-weight: 400;
    font-style: normal;
}

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

:root {
    --primary-bg: #fafafa;
    --secondary-bg: #ffffff;
    --primary-text: #2c2c2c;
    --secondary-text: #666666;
    --accent-color: #8b7355;
    --light-accent: #d4c4a8;
    --border-color: #e8e8e8;
    --hover-color: #f5f5f5;
    
    /* Mobile-specific variables */
    --mobile-padding: 1rem;
    --mobile-section-padding: 3rem 0;
    --touch-target-size: 44px;
    --mobile-font-scale: 0.9;
}

body {
    background-color: var(--primary-bg);
    color: var(--primary-text);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-overflow-scrolling: touch;
    /* Better font rendering on mobile */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Prevent tap highlight on mobile */
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    /* Enhanced safe area support for modern devices */
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* Loader Animation */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, var(--secondary-bg) 0%, var(--primary-bg) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

#loader.fade-out {
    opacity: 0;
    pointer-events: none;
}

.baroque-ornament {
    position: relative;
    width: 120px;
    height: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: guitarRotate 3s linear infinite;
}

.ornament-center {
    width: 120px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ornament-center img {
    width: 100px;
    height: 140px;
    object-fit: contain;
    animation: none;
    position: relative;
    z-index: 2;
}

.cyber-pulse {
    display: none;
}

/* Simple rotation animation */
@keyframes guitarRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Mobile optimizations for loader */
@media (max-width: 480px) {
    .baroque-ornament {
        width: 90px;
        height: 120px;
    }
    
    .ornament-center {
        width: 90px;
        height: 120px;
    }
    
    .ornament-center img {
        width: 75px;
        height: 105px;
    }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
    /* Enhanced safe area support */
    padding-top: max(env(safe-area-inset-top), 1rem);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: grid;
    grid-template-columns: minmax(300px, 1fr) auto minmax(200px, 1fr);
    align-items: center;
    gap: 3rem;
}

.nav-logo {
    justify-self: center;
}

.nav-logo h1 {
    font-size: 1.8rem;
    color: var(--primary-text);
    letter-spacing: 0.05em;
    margin: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.2rem;
    justify-self: start;
    margin: 0;
    margin-left: -1rem;
}

.nav-link {
    color: var(--secondary-text);
    text-decoration: none;
    font-family: "Faculty Glyphic", sans-serif;
    font-weight: 400;
    position: relative;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    /* Enhanced touch target */
    min-height: var(--touch-target-size);
    display: flex;
    align-items: center;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--primary-text);
}

.social-icons {
    display: flex;
    gap: 0.4rem;
    justify-self: end;
    align-items: center;
    margin-right: -0.5rem;
}

.social-icon {
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.3rem;
    border-radius: 8px;
    min-width: 36px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 115, 85, 0.1);
    border: 1px solid transparent;
}

.social-icon img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.social-icon:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(139, 115, 85, 0.3);
}

.social-icon:hover img {
    opacity: 1;
    transform: scale(1.1);
    filter: brightness(1.2);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    min-width: var(--touch-target-size);
    min-height: var(--touch-target-size);
    justify-content: center;
    align-items: center;
    position: absolute;
    right: 2rem;
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.bar {
    width: 25px;
    height: 2px;
    background: var(--primary-text);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 600px;
    max-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--secondary-bg);
    /* Mobile viewport fix */
    min-height: 100dvh;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(20%) brightness(0.9);
    /* Desktop: immagine centrata */
    object-position: center center;
}

.cyber-grid,
.baroque-pattern {
    display: none;
}

.hero-content {
    text-align: center;
    z-index: 2;
    padding: 2rem;
    background: transparent;
    border-radius: 2px;
    backdrop-filter: none;
    max-width: 500px;
    margin: 0 auto;
    /* Enhanced mobile positioning */
    position: relative;
    top: 0;
}

.hero-ornament {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.ornament-left, 
.ornament-right {
    display: none;
}

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

.hero-title {
    font-size: 3.5rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
    animation: titleFadeIn 2s ease-out;
    letter-spacing: 0.02em;
    /* Better mobile line height */
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #ffffff;
    margin-bottom: 2rem;
    animation: subtitleFadeIn 2s ease-out 0.5s both;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 400;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

.cyber-line {
    width: 80px;
    height: 1px;
    background: #ffffff;
    margin: 0 auto;
    opacity: 0;
    animation: lineFadeIn 2s ease-out 1s both;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

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

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

@keyframes lineFadeIn {
    from { opacity: 0; width: 0; }
    to { opacity: 1; width: 80px; }
}

.scroll-indicator {
    position: absolute;
    bottom: max(2rem, env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.scroll-arrow {
    width: 1px;
    height: 30px;
    background: #ffffff;
    position: relative;
    animation: scrollBounce 2s infinite;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.scroll-arrow::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: -3px;
    width: 7px;
    height: 7px;
    border-right: 1px solid #ffffff;
    border-bottom: 1px solid #ffffff;
    transform: rotate(45deg);
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

@keyframes scrollBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Sections */
.section {
    padding: 5rem 0;
    position: relative;
    /* Enhanced mobile padding */
    padding-left: max(2rem, env(safe-area-inset-left));
    padding-right: max(2rem, env(safe-area-inset-right));
}

.alt-bg {
    background: var(--secondary-bg);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-text);
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.baroque-divider {
    width: 60px;
    height: 1px;
    background: var(--accent-color);
    margin: 0 auto;
    position: relative;
}

.baroque-divider::before, 
.baroque-divider::after {
    display: none;
}

/* Bio Section */
.bio-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.bio-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--secondary-text);
}

.cyber-frame {
    width: 200px;
    height: 200px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: var(--secondary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cyber-frame:hover {
    border-color: var(--accent-color);
}

.cyber-frame::before {
    display: none;
}

.ornament-pattern {
    width: 100%;
    height: 100%;
    background-image: url('./images/matLaura.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 50%;
    opacity: 1;
    animation: none;
}

/* News Section */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.loading-news {
    text-align: center;
    padding: 3rem;
}

.cyber-pulse-small {
    width: 30px;
    height: 30px;
    border: 1px solid var(--accent-color);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: pulseSmall 2s ease-in-out infinite;
}

@keyframes pulseSmall {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.news-item {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    border-radius: 0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 120px;
}

.news-item::before {
    display: none;
}

.news-item:hover {
    border-color: var(--accent-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.news-date {
    color: var(--accent-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.news-title {
    color: var(--primary-text);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.news-content {
    color: var(--secondary-text);
    line-height: 1.6;
}

/* Discography Section */
.discography-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.album-card {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.album-card a {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    height: 100%;
}

.album-card::before {
    display: none;
}

.album-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transform: translateY(-3px);
}

.album-cover {
    margin-bottom: 1.5rem;
}

.cover-placeholder {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    background: var(--hover-color);
    border: 1px solid var(--border-color);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cover-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    transition: all 0.3s ease;
}

.album-card:hover .cover-placeholder {
    border-color: var(--accent-color);
}

.album-card:hover .cover-placeholder img {
    transform: scale(1.05);
}

.baroque-frame {
    width: 150px;
    height: 150px;
    border: 1px solid var(--light-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.baroque-frame span {
    font-size: 1rem;
    color: var(--accent-color);
    letter-spacing: 0.05em;
}

.album-title {
    color: var(--primary-text);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.album-year {
    color: var(--accent-color);
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

/* Royalty & Songs Tools Section Enhancements */
.songs-banner-container img {
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cyber-border:hover .songs-banner-container img {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.songs-platform img {
    transition: all 0.3s ease;
    filter: grayscale(20%);
}

.cyber-border:hover .songs-platform img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.royalty-explanation .cyber-border {
    background: linear-gradient(135deg, var(--secondary-bg) 0%, var(--primary-bg) 100%);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.royalty-explanation .cyber-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 115, 85, 0.1), transparent);
    transition: left 0.5s ease;
}

.royalty-explanation .cyber-border:hover::before {
    left: 100%;
}

/* Enhanced stream-link for Songs Tools */
.stream-link[href*="songs-tools"] {
    position: relative;
    overflow: hidden;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stream-link[href*="songs-tools"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.stream-link[href*="songs-tools"]:hover::before {
    left: 100%;
}

/* Royalty & Merchandise Section */
.royalty-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.royalty-card {
    position: relative;
}

.cyber-border {
    background: var(--secondary-bg);
    padding: 3rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cyber-border:hover {
    border-color: var(--accent-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.cyber-border::before {
    display: none;
}

.cyber-border h3 {
    color: var(--primary-text);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

.cyber-border p {
    color: var(--secondary-text);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.streaming-links, 
.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.stream-link, 
.social-link {
    color: var(--primary-text);
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: var(--touch-target-size);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    /* Enhanced touch target */
    min-width: 120px;
}

.stream-link::before, 
.social-link::before {
    display: none;
}

.stream-link:hover, 
.social-link:hover {
    background: var(--accent-color);
    color: var(--secondary-bg);
    border-color: var(--accent-color);
}

.merch-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.merch-item {
    color: var(--primary-text);
    padding: 1rem 1.5rem;
    background: var(--hover-color);
    border-left: 2px solid var(--accent-color);
    border-radius: 0;
    transition: all 0.3s ease;
    /* Enhanced touch target */
    min-height: var(--touch-target-size);
    display: flex;
    align-items: center;
}

.merch-item:hover {
    background: var(--secondary-bg);
    border-left-color: var(--primary-text);
}

/* Contact Section */
.contact-content {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.tally-form-wrapper {
    width: 100%;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.tally-form-wrapper:hover {
    border-color: var(--accent-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Tally.so form customization */
.tally-form-wrapper iframe {
    width: 100% !important;
    min-height: 500px;
    border: none;
    border-radius: 0;
    background: transparent;
    transition: opacity 0.3s ease;
}

/* Loading state for form */
.tally-form-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: var(--secondary-text);
    position: relative;
}

.tally-form-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--secondary-bg);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tally-form-loading::after {
    content: 'Caricamento form...';
    position: absolute;
    z-index: 2;
    color: var(--secondary-text);
    font-family: "Faculty Glyphic", sans-serif;
}

.tally-form-loading .cyber-pulse-small {
    margin-bottom: 1rem;
    z-index: 2;
    position: relative;
}

/* Enhanced iframe responsiveness */
@media (max-width: 768px) {
    .tally-form-wrapper iframe {
        min-height: 600px;
        height: auto;
    }
}

@media (max-width: 480px) {
    .tally-form-wrapper iframe {
        min-height: 700px;
    }
}

.contact-item h3 {
    color: var(--primary-text);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

.contact-item p {
    color: var(--secondary-text);
    font-size: 1.1rem;
}

.baroque-contact-frame {
    display: none;
}

.cyber-corner {
    display: none;
}

/* Footer */
.footer {
    background: var(--secondary-bg);
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    /* Enhanced safe area support */
    padding-bottom: max(3rem, calc(3rem + env(safe-area-inset-bottom)));
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

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

.footer-content p {
    color: var(--secondary-text);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.baroque-footer-line {
    width: 60px;
    height: 1px;
    background: var(--accent-color);
    margin: 0 auto;
    position: relative;
}

.baroque-footer-line::before, 
.baroque-footer-line::after {
    display: none;
}

/* =================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ================================= */

/* Very Small Mobile Devices (< 360px) */
@media (max-width: 359px) {
    :root {
        --mobile-padding: 0.75rem;
        --mobile-font-scale: 0.85;
    }
    
    .nav-container {
        padding: 0.75rem 1rem;
    }
    
    .nav-logo h1 {
        font-size: 1.3rem;
    }
    
    .hero-content {
        padding: 1.25rem;
        max-width: 95%;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .container {
        padding: 0 0.75rem;
    }
    
    .news-item,
    .cyber-border {
        padding: 1.5rem;
    }
    
    .bio-text p {
        font-size: 1rem;
    }
}

/* Small Mobile Devices (360px - 480px) */
@media (min-width: 360px) and (max-width: 480px) {
    :root {
        --mobile-padding: 1rem;
        --mobile-font-scale: 0.9;
    }
    
    .nav-container {
        padding: 1rem;
        grid-template-columns: auto 1fr auto;
        gap: 0.5rem;
    }
    
    .nav-logo h1 {
        font-size: 1.4rem;
    }
    
    .nav-menu {
        margin-left: 0;
    }
    
    .social-icons {
        gap: 0.2rem;
        margin-right: 0;
    }
    
    .social-icon {
        padding: 0.25rem;
        min-width: 32px;
        min-height: 32px;
    }
    
    .social-icon img {
        width: 14px;
        height: 14px;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        width: 100%;
        height: 100vh;
        text-align: center;
        transition: 0.3s;
        padding: max(calc(80px + env(safe-area-inset-top)), 100px) 1rem 2rem;
        backdrop-filter: blur(15px);
        justify-content: flex-start;
        gap: 1.5rem;
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 0;
        width: 100%;
    }
    
    .nav-link {
        font-size: 1.1rem;
        padding: 1rem;
        display: block;
        width: 100%;
        border-bottom: 1px solid var(--border-color);
        min-height: 50px;
    }
    
    .hero {
        min-height: max(100vh, 500px);
        min-height: max(100dvh, 500px);
    }
    
    .hero-content {
        padding: 1.5rem;
        max-width: 90%;
        margin-top: -10vh;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section {
        padding: var(--mobile-section-padding);
    }
    
    .container {
        padding: 0 var(--mobile-padding);
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .cyber-frame {
        width: 150px;
        height: 150px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .news-item {
        padding: 2rem;
    }
    
    .discography-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .cover-placeholder {
        width: 150px;
        height: 150px;
    }
    
    .baroque-frame {
        width: 120px;
        height: 120px;
    }
    
    .royalty-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .cyber-border {
        padding: 2rem 1.5rem;
    }
    
    .streaming-links, 
    .social-links {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .stream-link, 
    .social-link {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    /* Tally form mobile optimizations */
    .tally-form-wrapper {
        padding: 1.5rem;
        margin: 0 -0.5rem;
    }
    
    .tally-form-wrapper iframe {
        min-height: 600px;
    }
    
    .contact-content {
        margin: 0 -1rem;
    }
}

/* Medium Mobile Devices (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-container {
        grid-template-columns: auto 1fr auto;
        gap: 1rem;
        position: relative;
        padding: 1rem 1.5rem;
    }
    
    .nav-menu {
        margin-left: 0;
    }
    
    .social-icons {
        margin-right: 0;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        width: 100%;
        height: 100vh;
        text-align: center;
        transition: 0.3s;
        padding: max(calc(100px + env(safe-area-inset-top)), 120px) 2rem 2rem;
        border: none;
        backdrop-filter: blur(15px);
        justify-content: flex-start;
        gap: 2rem;
        /* Enhanced safe area support */
        padding-top: max(calc(100px + env(safe-area-inset-top)), 120px);
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 0;
        width: 100%;
    }
    
    .nav-link {
        font-size: 1.2rem;
        padding: 1rem 2rem;
        display: block;
        width: 100%;
        border-bottom: 1px solid var(--border-color);
        min-height: 60px;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .nav-logo {
        justify-self: center;
    }
    
    .nav-logo h1 {
        font-size: 1.6rem;
    }
    
    .social-icons {
        justify-self: end;
        gap: 0.2rem;
    }
    
    .social-icon {
        padding: 0.25rem;
        min-width: 32px;
        min-height: 32px;
    }
    
    .social-icon img {
        width: 14px;
        height: 14px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .royalty-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .discography-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 2.5rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .news-item {
        padding: 2.5rem 2rem;
    }
}

/* Tablets and Small Laptops (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 3rem;
    }
    
    .hero-title {
        font-size: 3.2rem;
    }
    
    .section-title {
        font-size: 2.3rem;
    }
    
    .discography-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .royalty-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

/* Large Tablets and Laptops (1025px - 1200px) */
@media (min-width: 1025px) and (max-width: 1200px) {
    .container {
        max-width: 900px;
    }
    
    .hero-title {
        font-size: 3.3rem;
    }
}

/* Landscape Orientation for Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        min-height: 100dvh;
    }
    
    .hero-content {
        margin-top: -5vh;
        padding: 1.5rem;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .scroll-indicator {
        bottom: 1rem;
    }
    
    .nav-menu {
        padding-top: max(calc(60px + env(safe-area-inset-top)), 80px);
    }
}

/* iPhone specific optimizations */
@supports (-webkit-touch-callout: none) {
    /* iPhone Safari specific fixes */
    .hero {
        min-height: -webkit-fill-available;
    }
    
    .nav-menu {
        height: -webkit-fill-available;
    }
    
    /* Fix for iOS Safari bottom bar */
    @media screen and (max-width: 768px) {
        .hero {
            height: calc(100vh - env(keyboard-inset-height, 0px));
        }
    }
}

/* Samsung Internet specific optimizations */
@media screen and (-webkit-min-device-pixel-ratio: 2) and (max-width: 768px) {
    .hero-title {
        -webkit-text-stroke: 0.5px;
    }
    
    .section-title {
        -webkit-text-stroke: 0.3px;
    }
}

/* High DPI displays (Retina, Samsung AMOLED) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-background img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    
    .ornament-center img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .nav-link:hover::after {
        width: 0;
    }
    
    .nav-link:active::after {
        width: 100%;
    }
    
    .album-card:hover,
    .news-item:hover,
    .cyber-border:hover {
        transform: none;
        box-shadow: none;
        border-color: var(--border-color);
    }
    
    /* Active states for touch */
    .album-card:active,
    .news-item:active,
    .cyber-border:active {
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        border-color: var(--accent-color);
    }
    
    .stream-link, 
    .social-link {
        min-height: 48px;
        padding: 1rem 1.5rem;
    }
    
    .hamburger {
        min-height: 48px;
        min-width: 48px;
    }
    
    /* Larger touch targets for mobile */
    .scroll-indicator {
        padding: 1rem;
        cursor: pointer;
    }
}

/* Foldable devices support */
@media (max-width: 768px) and (min-height: 600px) {
    .hero-content {
        position: relative;
        top: 0;
        transform: none;
    }
}

/* Ultra-wide screens */
@media (min-width: 1400px) {
    .container {
        max-width: 1200px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
}

/* Accessibility improvements for mobile */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-background img {
        transform: none !important;
    }
}

/* Dark mode support for mobile */
@media (prefers-color-scheme: dark) and (max-width: 768px) {
    .nav-menu {
        background-color: rgba(42, 42, 42, 0.98);
    }
    
    .hero-content {
        background: transparent;
    }
}

/* Highlighted Royalty link in navbar */
.nav-link[href="#royalty"] {
    color: #e74c3c !important;
    font-weight: 500;
    position: relative;
}

.nav-link[href="#royalty"]:hover {
    color: #c0392b !important;
}

.nav-link[href="#royalty"]::after {
    background: #e74c3c !important;
}

.nav-link[href="#royalty"]:hover::after {
    background: #c0392b !important;
}

/* Mobile: sposta il focus verso destra per mostrare il volto */
@media (max-width: 768px) {
    .hero-background img {
        object-position: 70% center;
    }
}

@media (max-width: 480px) {
    .hero-background img {
        object-position: 75% center;
    }
}
