/**
 * American Investment Trust - Modern Design 2026
 * Complete CSS Framework - RESPONSIVE
 */

/* ============================================
   CSS VARIABLES & ROOT CONFIGURATION
   ============================================ */
:root {
    /* Brand Colors */
    --primary-red: #cf173c;
    --primary-gold: #ffb400;
    --gray-text: #7f7873;
    --black-text: #1a1c23;
    --white: #ffffff;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #cf173c 0%, #a01230 100%);
    --gradient-gold: linear-gradient(135deg, #ffb400 0%, #ff8c00 100%);
    --gradient-overlay: linear-gradient(135deg, rgba(207, 23, 60, 0.95) 0%, rgba(160, 18, 48, 0.98) 100%);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.2);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-secondary: 'Manrope', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--gray-text);
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
    background: #f8f9fa;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    color: var(--white);
    font-weight: 800;
    line-height: 1.2;
}

/* ============================================
   MODERN HERO SECTION - INDEX PAGE
   ============================================ */
.modern-hero {
    position: relative;
    height: 90vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1c23 0%, #2d2f38 100%);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-overlay);
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #ffb400 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 400;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-hero-primary {
    background: var(--gradient-gold);
    color: #1a1c23;
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 24px rgba(255, 180, 0, 0.4);
}

.btn-hero-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(255, 180, 0, 0.6);
    color: #1a1c23;
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
    color: white;
}

/* ============================================
   STATS SECTION
   ============================================ */
.stats-section {
    background: var(--gradient-primary);
    padding: 80px 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path fill="rgba(255,255,255,0.05)" d="M0,0 L1200,0 L1200,120 L0,60 Z"/></svg>');
    opacity: 0.3;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
}

.stat-number {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
    color: var(--primary-gold);
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

/* ============================================
   FEATURES SECTION
   ============================================ */
.features-modern {
    padding: 100px 0;
    background: white;
}

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

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--black-text);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--gray-text);
    max-width: 600px;
    margin: 0 auto;
}

.feature-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-gold);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 28px;
    color: white;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--gradient-gold);
}

.feature-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--black-text);
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--gray-text);
    line-height: 1.7;
    margin-bottom: 0;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
    background: linear-gradient(135deg, #1a1c23 0%, #2d2f38 100%);
    padding: 80px 0;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,180,0,0.1) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.cta-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   DASHBOARD STYLES
   ============================================ */
.dashboard-hero {
    background: var(--gradient-primary);
    padding: 60px 0 40px;
    color: white;
    position: relative;
    overflow: hidden;
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 200"><circle cx="100" cy="100" r="200" fill="rgba(255,180,0,0.1)"/><circle cx="1000" cy="50" r="150" fill="rgba(255,180,0,0.1)"/></svg>');
    opacity: 0.3;
}

.dashboard-header {
    position: relative;
    z-index: 2;
}

.dashboard-welcome {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.welcome-text h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: white;
}

.welcome-text p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

.balance-overview {
    margin-top: -40px;
    position: relative;
    z-index: 10;
}

.balance-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.balance-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.balance-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-text);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.balance-amount {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--black-text);
    margin-bottom: 0;
}

.balance-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.balance-icon i {
    font-size: 1.75rem;
    color: white;
}

/* ============================================
   INFO CARDS
   ============================================ */
.info-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.info-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-gold);
}

.info-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--black-text);
    word-break: break-all;
}

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

/* Tablet - 768px to 991px */
@media (max-width: 991px) {
    .modern-hero {
        height: 70vh;
        min-height: 500px;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .features-modern {
        padding: 80px 0;
    }
    
    .feature-card {
        padding: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .dashboard-hero {
        padding: 50px 0 30px;
    }
    
    .dashboard-welcome {
        text-align: center;
        flex-direction: column;
    }
    
    .balance-overview {
        margin-top: -20px;
    }
}

/* Mobile - 576px to 767px */
@media (max-width: 767px) {
    body {
        font-size: 15px;
    }
    
    .modern-hero {
        height: auto;
        min-height: 500px;
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .stats-section {
        padding: 60px 0;
    }
    
    .stat-item {
        margin-bottom: 2rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .stat-label {
        font-size: 1rem;
    }
    
    .features-modern {
        padding: 60px 0;
    }
    
    .section-header {
        margin-bottom: 3rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .feature-title {
        font-size: 1.2rem;
    }
    
    .cta-section {
        padding: 60px 0;
    }
    
    .dashboard-hero {
        padding: 40px 0 20px;
    }
    
    .balance-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .info-card {
        padding: 1.25rem;
        margin-bottom: 1rem;
    }
}

/* Small Mobile - max 576px */
@media (max-width: 576px) {
    .modern-hero {
        padding: 40px 0;
        min-height: 400px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .feature-card {
        padding: 1.25rem;
    }
    
    .balance-amount {
        font-size: 1.75rem;
    }
    
    .info-label {
        font-size: 0.8rem;
    }
    
    .info-value {
        font-size: 1rem;
    }
}

/* Extra Small - max 400px */
@media (max-width: 400px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .btn-hero-primary,
    .btn-hero-secondary {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

/* ============================================
   PREVENT HORIZONTAL SCROLL
   ============================================ */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

* {
    max-width: 100%;
}

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

/* ============================================
   FIX PARA IMAGEN DE FONDO DEL HERO
   Agrega esto al final de tu modern-style.css
   ============================================ */

.modern-hero {
    position: relative;
    height: 90vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1c23 0%, #2d2f38 100%);
}

/* Imagen de fondo - CRÍTICO */
.hero-background {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    opacity: 0.3 !important;
    z-index: 1 !important;
}

/* Overlay oscuro sobre la imagen */
.hero-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(135deg, rgba(207, 23, 60, 0.85) 0%, rgba(160, 18, 48, 0.9) 100%) !important;
    z-index: 2 !important;
}

/* Formas decorativas */
.hero-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 180, 0, 0.1);
    animation: float 6s ease-in-out infinite;
    z-index: 3;
}

.hero-shape-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.hero-shape-2 {
    width: 200px;
    height: 200px;
    bottom: 20%;
    left: 5%;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0) rotate(0deg); 
    }
    50% { 
        transform: translateY(-30px) rotate(5deg); 
    }
}

/* Contenido del hero - debe estar sobre todo */
.hero-content {
    position: relative !important;
    z-index: 10 !important;
    color: white !important;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #ffb400 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 400;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-hero-primary {
    background: linear-gradient(135deg, #ffb400 0%, #ff8c00 100%);
    color: #1a1c23;
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 24px rgba(255, 180, 0, 0.4);
    position: relative;
    z-index: 10;
}

.btn-hero-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(255, 180, 0, 0.6);
    color: #1a1c23;
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
    color: white;
}

/* RESPONSIVE */
@media (max-width: 991px) {
    .modern-hero {
        height: 70vh;
        min-height: 500px;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .hero-shape-1 {
        width: 200px;
        height: 200px;
    }
    
    .hero-shape-2 {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 767px) {
    .modern-hero {
        height: auto;
        min-height: 500px;
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-shape-1,
    .hero-shape-2 {
        display: none; /* Ocultar en móvil para mejor rendimiento */
    }
}

@media (max-width: 576px) {
    .modern-hero {
        padding: 40px 0;
        min-height: 400px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .btn-hero-primary,
    .btn-hero-secondary {
        padding: 12px 30px;
        font-size: 14px;
    }
}