/* ===== GUSTAVO FREIRE BJJ ACADEMY - CSS ===== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: #0a0a0a;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== CSS VARIABLES ===== */
:root {
    /* Colors */
    --primary-color: #dc2626; /* Red */
    --primary-dark: #991b1b;
    --secondary-color: #1a1a1a;
    --dark-color: #0a0a0a;
    --dark-light: #1f1f1f;
    --white-color: #ffffff;
    --gray-color: #9ca3af;
    --gray-light: #d1d5db;
    --gray-dark: #374151;
    
    /* Typography */
    --heading-font: 'Oswald', sans-serif;
    --body-font: 'Open Sans', sans-serif;
    
    /* Font Sizes */
    --h1-font-size: 3rem;
    --h2-font-size: 2.5rem;
    --h3-font-size: 1.75rem;
    --h4-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;
    --smaller-font-size: 0.75rem;
    
    /* Font Weight */
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semi-bold: 600;
    --font-bold: 700;
    
    /* Spacing */
    --header-height: 4rem;
    --section-padding: 6rem 0;
    --container-margin: 0 1rem;
    
    /* Border Radius */
    --border-radius: 0.5rem;
    --border-radius-lg: 1rem;
    
    /* Shadows */
    --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 25px rgba(0, 0, 0, 0.3);
    --shadow-heavy: 0 20px 40px rgba(0, 0, 0, 0.5);
    
    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-medium: 0.5s ease;
    --transition-slow: 0.7s ease;
    
    /* Z-index */
    --z-fixed: 100;
    --z-modal: 1000;
}

/* ===== RESPONSIVE TYPOGRAPHY ===== */
@media screen and (max-width: 768px) {
    :root {
        --h1-font-size: 2.25rem;
        --h2-font-size: 2rem;
        --h3-font-size: 1.5rem;
        --h4-font-size: 1.125rem;
    }
}

/* ===== UTILITY CLASSES ===== */
.container {
    max-width: 1200px;
    margin: var(--container-margin);
    margin-left: auto;
    margin-right: auto;
}

.section {
    padding: var(--section-padding);
}

.section__title {
    font-family: var(--heading-font);
    font-size: var(--h2-font-size);
    font-weight: var(--font-bold);
    color: var(--white-color);
    text-align: center;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: fadeInUp 1s ease;
}

.section__subtitle {
    font-size: var(--normal-font-size);
    color: var(--gray-color);
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease 0.2s both;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    font-family: var(--heading-font);
    font-size: var(--normal-font-size);
    font-weight: var(--font-semi-bold);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn::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 var(--transition-medium);
}

.btn:hover::before {
    left: 100%;
}

.btn__primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white-color);
    box-shadow: var(--shadow-medium);
}

.btn__primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.btn__secondary {
    background: transparent;
    color: var(--white-color);
    border: 2px solid var(--primary-color);
}

.btn__secondary:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

/* ===== HEADER & NAVIGATION ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: var(--z-fixed);
    transition: all var(--transition-fast);
}

.header.scroll-header {
    background: rgba(10, 10, 10, 0.98);
    box-shadow: var(--shadow-medium);
}

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

.nav__brand {
    display: flex;
    align-items: center;
}

.nav__logo {
    font-family: var(--heading-font);
    font-size: var(--h4-font-size);
    font-weight: var(--font-bold);
    color: var(--white-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav__menu {
    display: flex;
    align-items: center;
}

.nav__list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav__link {
    font-family: var(--heading-font);
    font-size: var(--normal-font-size);
    font-weight: var(--font-medium);
    color: var(--gray-light);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all var(--transition-fast);
    position: relative;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width var(--transition-fast);
}

.nav__link:hover,
.nav__link.active-link {
    color: var(--white-color);
}

.nav__link:hover::after,
.nav__link.active-link::after {
    width: 100%;
}

.nav__cta {
    background: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    color: var(--white-color) !important;
}

.nav__cta:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.nav__toggle,
.nav__close {
    display: none;
    cursor: pointer;
    color: var(--white-color);
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
    overflow: hidden;
}

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.8), rgba(220, 38, 38, 0.1));
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeInUp 1s ease;
}

.hero__image {
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero__team-photo {
    width: 100%;
    max-width: 800px;
    height: 500px;
    object-fit: cover;
    border-radius: var(--border-radius-lg);
    border: 3px solid var(--primary-color);
    box-shadow: var(--shadow-heavy);
    transition: all var(--transition-medium);
}

.hero__team-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 60px rgba(220, 38, 38, 0.3);
}

.hero__title {
    font-family: var(--heading-font);
    font-size: var(--h1-font-size);
    font-weight: var(--font-bold);
    color: var(--white-color);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease 0.2s both;
}

.hero__subtitle {
    font-size: var(--h3-font-size);
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: var(--font-semi-bold);
    animation: fadeInUp 1s ease 0.4s both;
}

.hero__description {
    font-size: var(--normal-font-size);
    color: var(--gray-light);
    margin-bottom: 2rem;
    line-height: 1.8;
    animation: fadeInUp 1s ease 0.6s both;
}

.hero__actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.8s both;
}

.hero__scroll {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    animation: bounce 2s infinite;
}

.hero__scroll-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    color: var(--primary-color);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.hero__scroll-link:hover {
    background: var(--primary-color);
    color: var(--white-color);
    transform: scale(1.1);
}

/* ===== CORSI SECTION ===== */
.corsi {
    background: var(--secondary-color);
}

.corsi__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.corso__card {
    background: var(--dark-light);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(220, 38, 38, 0.1);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 1s ease;
}

.corso__card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    transform: scaleX(0);
    transition: transform var(--transition-fast);
}

.corso__card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
    border-color: var(--primary-color);
}

.corso__card:hover::before {
    transform: scaleX(1);
}

.corso__card--featured {
    border: 2px solid var(--primary-color);
    position: relative;
}

.corso__badge {
    position: absolute;
    top: -1px;
    right: -1px;
    background: var(--primary-color);
    color: var(--white-color);
    padding: 0.5rem 1rem;
    border-radius: 0 var(--border-radius-lg) 0 var(--border-radius);
    font-size: var(--small-font-size);
    font-weight: var(--font-semi-bold);
    text-transform: uppercase;
}

.corso__icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--white-color);
}

.corso__title {
    font-family: var(--heading-font);
    font-size: var(--h3-font-size);
    font-weight: var(--font-bold);
    color: var(--white-color);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.corso__description {
    color: var(--gray-color);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.corso__features {
    list-style: none;
    margin-bottom: 2rem;
}

.corso__features li {
    padding: 0.5rem 0;
    color: var(--gray-light);
    position: relative;
    padding-left: 1.5rem;
}

.corso__features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: var(--font-bold);
}

.corso__contact {
    font-family: var(--heading-font);
    font-size: var(--normal-font-size);
    font-weight: var(--font-semi-bold);
    color: var(--white-color);
    text-align: center;
    padding: 1rem;
    background: rgba(220, 38, 38, 0.1);
    border-radius: var(--border-radius);
    border: 1px solid var(--primary-color);
}

.corso__contact strong {
    color: var(--primary-color);
    font-size: var(--h4-font-size);
    display: block;
    margin-top: 0.25rem;
}

/* ===== ORARI SECTION ===== */
.orari {
    background: var(--dark-color);
}

.orari__table {
    background: var(--dark-light);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    animation: fadeInUp 1s ease;
}

.orari__header {
    display: grid;
    grid-template-columns: 1fr repeat(3, 1fr);
    background: var(--primary-color);
    padding: 1rem;
    font-family: var(--heading-font);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.orari__row {
    display: grid;
    grid-template-columns: 1fr repeat(3, 1fr);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background var(--transition-fast);
}

.orari__row:hover {
    background: rgba(220, 38, 38, 0.05);
}

.orari__row:last-child {
    border-bottom: none;
}

.orari__day {
    padding: 1rem;
    font-family: var(--heading-font);
    font-weight: var(--font-semi-bold);
    color: var(--white-color);
    background: rgba(220, 38, 38, 0.1);
    text-transform: uppercase;
}

.orari__time {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.orari__class {
    font-weight: var(--font-semi-bold);
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    font-size: var(--small-font-size);
}

.orari__hour {
    color: var(--gray-light);
    font-size: var(--small-font-size);
}

.orari__note {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(220, 38, 38, 0.1);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    text-align: center;
    color: var(--gray-light);
    animation: fadeInUp 1s ease 0.5s both;
}

/* ===== MAESTRO SECTION ===== */
.maestro {
    background: var(--secondary-color);
}

.maestro__content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: center;
    animation: fadeInUp 1s ease;
}

.maestro__image {
    position: relative;
}

.maestro__photo {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-heavy);
    transition: transform var(--transition-medium);
}

.maestro__photo:hover {
    transform: scale(1.05);
}

.maestro__badge {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: var(--primary-color);
    color: var(--white-color);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-weight: var(--font-semi-bold);
    text-transform: uppercase;
    font-size: var(--small-font-size);
}

.maestro__info .section__title {
    text-align: left;
    margin-bottom: 0.5rem;
}

.maestro__subtitle {
    color: var(--primary-color);
    font-size: var(--h4-font-size);
    font-weight: var(--font-semi-bold);
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.maestro__bio {
    margin-bottom: 2rem;
}

.maestro__bio p {
    color: var(--gray-light);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.maestro__achievements h3 {
    color: var(--white-color);
    margin-bottom: 1rem;
    font-family: var(--heading-font);
    text-transform: uppercase;
}

.maestro__achievements ul {
    list-style: none;
    margin-bottom: 2rem;
}

.maestro__achievements li {
    padding: 0.5rem 0;
    color: var(--gray-light);
    line-height: 1.6;
}

.maestro__quote {
    background: var(--dark-light);
    padding: 2rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    position: relative;
}

.maestro__quote blockquote {
    font-style: italic;
    color: var(--gray-light);
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: var(--normal-font-size);
}

.maestro__quote cite {
    color: var(--primary-color);
    font-weight: var(--font-semi-bold);
    font-style: normal;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--dark-color);
    border-top: 1px solid rgba(220, 38, 38, 0.2);
}

.footer__content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    padding: 3rem 0;
}

.footer__brand h3 {
    font-family: var(--heading-font);
    color: var(--white-color);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.footer__brand p {
    color: var(--gray-color);
    font-style: italic;
}

.footer__info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer__section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-family: var(--heading-font);
    text-transform: uppercase;
}

.footer__section p {
    color: var(--gray-light);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.footer__social {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer__social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-light);
    text-decoration: none;
    transition: all var(--transition-fast);
    padding: 0.5rem;
    border-radius: var(--border-radius);
}

.footer__social-link:hover {
    color: var(--primary-color);
    background: rgba(220, 38, 38, 0.1);
    transform: translateX(5px);
}

.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
    text-align: center;
}

.footer__bottom p {
    color: var(--gray-color);
    margin-bottom: 0.5rem;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media screen and (max-width: 968px) {
    .container {
        margin-left: 1.5rem;
        margin-right: 1.5rem;
    }
    
    .maestro__content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer__content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media screen and (max-width: 968px) {
    .hero__team-photo {
        max-width: 600px;
        height: 400px;
    }
}

@media screen and (max-width: 768px) {
    :root {
        --section-padding: 4rem 0;
    }
    
    .hero__team-photo {
        max-width: 450px;
        height: 300px;
    }
    
    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: rgba(10, 10, 10, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        transition: right var(--transition-fast);
        z-index: var(--z-modal);
    }
    
    .nav__menu.show-menu {
        right: 0;
    }
    
    .nav__list {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .nav__close,
    .nav__toggle {
        display: block;
        font-size: 1.5rem;
    }
    
    .nav__close {
        position: absolute;
        top: 1rem;
        right: 1rem;
    }
    
    .hero__actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero__actions .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .corsi__grid {
        grid-template-columns: 1fr;
    }
    
    .orari__table {
        overflow-x: auto;
    }
    
    .orari__header,
    .orari__row {
        min-width: 600px;
    }
    
    .maestro__photo {
        height: 300px;
    }
    
    .footer__info {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 576px) {
    .container {
        margin-left: 1rem;
        margin-right: 1rem;
    }
    
    .hero__title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero__subtitle {
        font-size: 1.25rem;
    }
    
    .hero__team-photo {
        width: 320px;
        height: 240px;
    }
    
    .section__title {
        font-size: 2rem;
    }
    
    .corso__card {
        padding: 1.5rem;
    }
    
    .orari__header,
    .orari__row {
        font-size: var(--small-font-size);
    }
    
    .orari__day,
    .orari__time {
        padding: 0.75rem;
    }
    
    .maestro__quote {
        padding: 1.5rem;
    }
}

/* ===== UTILITY ANIMATIONS ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ===== PRELOADER (Optional) ===== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity var(--transition-medium);
}

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

.preloader__logo {
    font-family: var(--heading-font);
    font-size: 3rem;
    color: var(--primary-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* ===== SCROLL TO TOP BUTTON ===== */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: var(--primary-color);
    color: var(--white-color);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    z-index: var(--z-fixed);
}

.scroll-top.show-scroll {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .header,
    .hero__scroll,
    .footer {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .section {
        page-break-inside: avoid;
    }
}