/* ============================================================================
   BRACO'S BARBERÍA - ESTILOS GLOBALES
   Design System: Elegancia Masculina
   ============================================================================ */

/* ============================================================================
   VARIABLES CSS
   ============================================================================ */
:root {
    /* Colores */
    --gold: #C4A35A;
    --gold-dark: #A68B4A;
    --gold-light: #D4B36A;
    --charcoal-dark: #2D2D2D;
    --charcoal: #3A3A3A;
    --charcoal-light: #4A4A4A;
    --cream: #F5F5F0;
    --cream-dark: #E5E5D0;

    /* Tipografía */
    --font-display: 'Cormorant Garamond', serif;
    --font-body: 'Montserrat', sans-serif;

    /* Espaciado */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Transiciones */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Sombras */
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.3);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--charcoal-dark);
    color: var(--cream);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* ============================================================================
   TIPOGRAFÍA
   ============================================================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 1.8rem);
}

h4 {
    font-size: 1.3rem;
}

h5 {
    font-size: 1.1rem;
}

h6 {
    font-size: 1rem;
}

p {
    font-size: 1rem;
    line-height: 1.8;
    color: rgba(245, 245, 240, 0.9);
}

.text-small {
    font-size: 0.875rem;
}

.text-tiny {
    font-size: 0.75rem;
}

.text-large {
    font-size: 1.25rem;
}

.font-display {
    font-family: var(--font-display);
}

.font-body {
    font-family: var(--font-body);
}

.uppercase {
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

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

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

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

/* ============================================================================
   HEADER & NAVEGACIÓN
   ============================================================================ */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 1rem 4rem;
    background: rgba(45, 45, 45, 0.98);
    border-bottom: 1px solid rgba(196, 163, 90, 0.15);
    z-index: 1000;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

header.scrolled {
    padding: 0.75rem 4rem;
    background: rgba(45, 45, 45, 0.99);
    box-shadow: var(--shadow-md);
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

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

.logo-img {
    height: 85px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 0.15em;
}

.logo-subtitle {
    font-size: 0.6rem;
    letter-spacing: 0.3em;
    color: var(--gold);
    text-transform: uppercase;
    margin-top: -2px;
    opacity: 0.8;
}

.footer-logo-img {
    height: 80px;
    width: auto;
    object-fit: contain;
    margin-bottom: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-links a {
    color: var(--cream);
    text-decoration: none;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--gold);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-cta {
    margin-left: 1rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--gold);
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu */
.mobile-nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--charcoal-dark);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-bottom: 1px solid rgba(196, 163, 90, 0.15);
    z-index: 999;
    overflow-y: auto;
}

.mobile-nav.active {
    display: block;
}

.mobile-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-nav a {
    display: block;
    padding: 0.75rem 0;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cream);
    transition: color 0.3s ease;
}

.mobile-nav a:hover {
    color: var(--gold);
}

/* ============================================================================
   BOTONES
   ============================================================================ */
.btn-primary,
.btn-secondary,
.btn-outline {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gold);
    color: var(--charcoal-dark);
    border: 1px solid var(--gold);
}

.btn-primary:hover {
    background: var(--gold-light);
    border-color: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(196, 163, 90, 0.3);
}

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

.btn-primary:disabled {
    background: var(--charcoal-light);
    border-color: var(--charcoal-light);
    color: rgba(245, 245, 240, 0.5);
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: transparent;
    color: var(--cream);
    border: 1px solid rgba(196, 163, 90, 0.4);
}

.btn-secondary:hover {
    border-color: var(--gold);
    color: var(--gold);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
}

.btn-outline:hover {
    background: var(--gold);
    color: var(--charcoal-dark);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-small {
    padding: 0.75rem 1.5rem;
    font-size: 0.75rem;
}

.btn-large {
    padding: 1.25rem 3rem;
    font-size: 0.9rem;
}

/* ============================================================================
   FORMULARIOS
   ============================================================================ */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
textarea,
select {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--charcoal);
    border: 1px solid rgba(196, 163, 90, 0.2);
    color: var(--cream);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border-radius: 0;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--gold);
    background: var(--charcoal-light);
}

input::placeholder,
textarea::placeholder {
    color: rgba(245, 245, 240, 0.4);
}

input:disabled,
textarea:disabled,
select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.form-hint {
    font-size: 0.75rem;
    color: rgba(245, 245, 240, 0.6);
    margin-top: 0.5rem;
    display: block;
}

.form-error {
    font-size: 0.75rem;
    color: #ff6b6b;
    margin-top: 0.5rem;
    display: block;
}

input.error,
textarea.error,
select.error {
    border-color: #ff6b6b;
}

/* ============================================================================
   SECCIONES & CONTENEDORES
   ============================================================================ */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

.section {
    padding: var(--spacing-xl) var(--spacing-md);
}

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

.section-label {
    font-size: 0.7rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--gold);
    display: block;
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.5rem);
    color: var(--cream);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: rgba(245, 245, 240, 0.7);
    max-width: 600px;
    margin: 0 auto;
}

.section-line {
    width: 40px;
    height: 1px;
    background: var(--gold);
    margin: 1.5rem auto;
}

/* ============================================================================
   CARDS
   ============================================================================ */
.card {
    background: var(--charcoal);
    border: 1px solid rgba(196, 163, 90, 0.15);
    padding: 2rem;
    transition: all 0.4s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(196, 163, 90, 0.4);
    box-shadow: var(--shadow-lg);
}

.card-header {
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.4rem;
    color: var(--cream);
    margin-bottom: 0.5rem;
}

.card-subtitle {
    font-size: 0.9rem;
    color: rgba(245, 245, 240, 0.7);
}

.card-body {
    margin-bottom: 1.5rem;
}

.card-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(196, 163, 90, 0.1);
}

/* ============================================================================
   GRIDS
   ============================================================================ */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-auto {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* ============================================================================
   FOOTER
   ============================================================================ */
footer {
    background: var(--charcoal-dark);
    border-top: 1px solid rgba(196, 163, 90, 0.15);
    padding: 4rem 2rem 2rem;
    text-align: center;
}

.footer-logo {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-info {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-section h4 {
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
    font-size: 0.9rem;
    color: rgba(245, 245, 240, 0.7);
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: var(--gold);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(196, 163, 90, 0.1);
    font-size: 0.75rem;
    color: rgba(245, 245, 240, 0.5);
    letter-spacing: 0.1em;
}

/* ============================================================================
   UTILIDADES
   ============================================================================ */
.hidden {
    display: none !important;
}

.invisible {
    visibility: hidden;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 2rem;
}

.mt-4 {
    margin-top: 4rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 2rem;
}

.mb-4 {
    margin-bottom: 4rem;
}

.pt-1 {
    padding-top: 0.5rem;
}

.pt-2 {
    padding-top: 1rem;
}

.pt-3 {
    padding-top: 2rem;
}

.pt-4 {
    padding-top: 4rem;
}

.pb-1 {
    padding-bottom: 0.5rem;
}

.pb-2 {
    padding-bottom: 1rem;
}

.pb-3 {
    padding-bottom: 2rem;
}

.pb-4 {
    padding-bottom: 4rem;
}

.flex {
    display: flex;
}

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

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 2rem;
}

.gap-4 {
    gap: 4rem;
}

/* ============================================================================
   ANIMACIONES
   ============================================================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

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

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
/* ========== RESPONSIVE DESIGN ========== */

/* Tablets y pantallas medianas (hasta 1024px) */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

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

    header nav {
        padding: 0 1.5rem;
    }
}

/* Tablets y móviles (hasta 768px) */
@media (max-width: 768px) {
    header {
        padding: 1rem 1.5rem;
    }

    header.scrolled {
        padding: 0.75rem 1.5rem;
    }

    .nav-links,
    .nav-cta {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-nav {
        padding: 2rem 1.5rem;
    }

    .mobile-nav ul {
        gap: 0.5rem;
    }

    .mobile-nav a {
        padding: 1rem;
        font-size: 1rem;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .section {
        padding: var(--spacing-lg) var(--spacing-sm);
    }

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

    .section-subtitle {
        font-size: 0.95rem;
    }

    .footer-info {
        flex-direction: column;
        gap: 2rem;
    }

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

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

/* Móviles pequeños (hasta 480px) */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    header {
        padding: 0.75rem 1rem;
    }

    .logo-img {
        height: 40px;
    }

    .logo-text {
        font-size: 1.5rem;
    }

    .mobile-menu-btn {
        width: 35px;
        height: 35px;
    }

    .mobile-menu-btn span {
        width: 20px;
    }

    .mobile-nav {
        padding: 1.5rem 1rem;
    }

    .mobile-nav a {
        padding: 0.875rem;
        font-size: 0.9rem;
    }

    .btn-primary,
    .btn-secondary,
    .btn-outline {
        padding: 0.875rem 1.75rem;
        font-size: 0.75rem;
    }

    .btn-large {
        padding: 1.25rem 2.5rem;
        font-size: 0.85rem;
    }

    .btn-small {
        padding: 0.5rem 1rem;
        font-size: 0.7rem;
    }

    .section {
        padding: var(--spacing-md) var(--spacing-xs);
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-label {
        font-size: 0.65rem;
    }

    .section-subtitle {
        font-size: 0.85rem;
    }

    footer {
        padding: var(--spacing-md) var(--spacing-xs);
    }

    .footer-logo-img {
        height: 50px;
    }

    .footer-section h4 {
        font-size: 0.9rem;
    }

    .footer-section p,
    .footer-section a {
        font-size: 0.8rem;
    }

    .footer-bottom p {
        font-size: 0.7rem;
    }
}

/* Móviles muy pequeños (hasta 360px) */
@media (max-width: 360px) {
    html {
        font-size: 13px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .btn-primary,
    .btn-secondary,
    .btn-outline {
        padding: 0.75rem 1.5rem;
    }
}

/* Landscape mode para móviles */
@media (max-width: 768px) and (orientation: landscape) {
    .mobile-nav {
        max-height: 100vh;
        overflow-y: auto;
    }

    .section {
        padding: var(--spacing-md) var(--spacing-sm);
    }
}


/* ============================================================================
   ENHANCED RESPONSIVE IMPROVEMENTS
   ============================================================================ */

/* Touch-friendly elements */
@media (max-width: 768px) {
    .btn-primary,
    .btn-secondary,
    .btn-outline,
    button,
    a.btn-primary,
    a.btn-secondary {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="date"],
    input[type="time"],
    textarea,
    select {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 48px;
    }
}

/* Container padding adjustments */
@media (max-width: 480px) {
    .container,
    .container-sm {
        padding: 0 1rem;
    }
}

/* Better card spacing on mobile */
@media (max-width: 480px) {
    .card {
        padding: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .card-header {
        margin-bottom: 1rem;
    }
    
    .card-title {
        font-size: 1.2rem;
    }
}

/* Grid auto-fit improvements */
@media (max-width: 480px) {
    .grid-auto {
        grid-template-columns: 1fr;
    }
}

/* Footer improvements */
@media (max-width: 480px) {
    footer {
        padding: 2rem 1rem 1.5rem;
    }
    
    .footer-info {
        gap: 1.5rem;
    }
    
    .footer-section h4 {
        font-size: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .footer-section p,
    .footer-section a {
        font-size: 0.8rem;
    }
    
    .footer-bottom {
        padding-top: 1.5rem;
        font-size: 0.65rem;
    }
}

/* Safe area insets for notched devices */
@supports (padding: max(0px)) {
    header {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
    
    footer {
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
    }
    
    .mobile-nav {
        padding-left: max(2rem, env(safe-area-inset-left));
        padding-right: max(2rem, env(safe-area-inset-right));
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
    }
}

/* Improved focus states for accessibility */
@media (max-width: 768px) {
    a:focus,
    button:focus,
    input:focus,
    select:focus,
    textarea:focus {
        outline: 2px solid var(--gold);
        outline-offset: 2px;
    }
}

/* Prevent horizontal scroll */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Better text readability on small screens */
@media (max-width: 480px) {
    p {
        font-size: 0.9rem;
        line-height: 1.7;
    }
    
    .text-small {
        font-size: 0.8rem;
    }
    
    .text-tiny {
        font-size: 0.7rem;
    }
}

/* Print styles */
@media print {
    header,
    footer,
    .mobile-menu-btn,
    .mobile-nav,
    .btn-primary,
    .btn-secondary {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .section {
        padding: 1rem 0;
    }
}
