:root {
    --primary-color: #2f76a8;
    --secondary-color: #87ceeb;
    --accent-color: #b0d3e6;
    --text-dark: #54595F;
    --text-light: #ffffff;
    --bg-light: #f8fafc;
}

/* Smooth scrolling for all browsers */
html {
    scroll-behavior: smooth;
}

/* Enhanced smooth scrolling for better user experience */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Offset for fixed navbar to prevent content being hidden */
section[id] {
    scroll-margin-top: 80px;
}

body {
    font-family: "Pompiere", sans-serif;
    color: var(--text-dark);
    font-size: 20px;
}

.script-font {
    font-family: 'Dancing Script', cursive;
}
.script-font2 {
    font-family: "Pompiere", sans-serif;
}

.bg-primary-custom {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.bg-accent-custom {
    background-color: var(--accent-color) !important;
}

.text-primary-custom {
    color: var(--primary-color) !important;
}

.btn-primary-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary-custom:hover {
    background-color: #3a7bc8;
    border-color: #3a7bc8;
}

.navbar-brand {
    font-family: 'Dancing Script', cursive;
    font-size: 1.8rem;
}

.countdown-box {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin: 0.5rem;
}

.photo-frame {
    border-radius: 50%;
    border: 5px solid var(--primary-color);
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

/* Estilos adicionales para la nueva paleta */
.bg-secondary-custom {
    background-color: var(--secondary-color) !important;
}

.bg-accent-custom {
    background-color: var(--accent-color) !important;
}

.text-secondary-custom {
    color: var(--secondary-color) !important;
}

.border-primary-custom {
    border-color: var(--primary-color) !important;
}

.btn-outline-primary-custom {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: transparent;
}

.btn-outline-primary-custom:hover {
    color: var(--text-light);
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.card-custom {
    border: 1px solid var(--accent-color);
    background: linear-gradient(135deg, var(--text-light), var(--bg-light));
}

.navbar-custom {
    background: linear-gradient(90deg, var(--text-light), var(--bg-light)) !important;
    border-bottom: 2px solid var(--accent-color);
}

.footer-custom {
    background: linear-gradient(135deg, var(--text-dark), #2c3e50) !important;
}

/* Hero Section Styles */
.hero-section {
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

/* Parallax CSS para navegadores compatibles */
@supports (background-attachment: fixed) {
    @media (min-width: 769px) {
        .hero-section:not(.js-parallax) {
            background-attachment: fixed !important;
        }
    }
}

/* Fallback parallax con JavaScript */
.js-parallax {
    background-attachment: scroll !important;
    will-change: background-position;
}

/* Optimización para móviles */
@media (max-width: 768px) {
    .hero-section {
        background-attachment: scroll !important;
    }
}

@media (max-width: 768px) {
    .hero-section {
        background-attachment: scroll;
    }
    
    #home h1 {
        font-size: 3rem !important;
    }
}

/* iOS Safari parallax fix */
@media (max-width: 768px) and (-webkit-min-device-pixel-ratio: 1) {
    .hero-section {
        background-attachment: scroll;
        background-position: center center;
    }
}

/* Parallax performance enhancement */
.parallax-section {
    will-change: background-position;
    transform: translate3d(0, 0, 0);
}

@supports (background-attachment: fixed) {
    @media (min-width: 769px) {
        .parallax-section {
            background-attachment: fixed !important;
        }
    }
}

@media (max-width: 768px) {
    .parallax-section {
        background-attachment: scroll !important;
    }
}

/* Overlay para mejor legibilidad */
.hero-overlay {
    backdrop-filter: blur(1px);
}

/* Timeline Styles */
.timeline-container {
    position: relative;
    padding: 2rem 0;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    transform: translateX(-50%);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 3rem;
    padding: 0 2rem;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-item:nth-child(even) .timeline-content {
    text-align: right;
}

.timeline-time {
    flex: 0 0 100px;
    padding: 0 1rem;
}

.time-text {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 18px;
    white-space: nowrap;
}

.timeline-icon {
    flex: 0 0 60px;
    height: 60px;
    background: white;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    position: relative;
    z-index: 2;
    margin: 0 1rem;
}

.timeline-content {
    flex: 1;
    background: white;
    padding: 0.5rem 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-left: 4px solid var(--accent-color);
    margin: 0 1rem;
}

.timeline-content h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-item-last {
    margin-bottom: 0;
}
.fondo-azul {
    background: #2e76a8;
    padding: 40px 20px;
    color: #fff;
}
/* Mobile Timeline Styles */
@media (max-width: 768px) {
    .timeline-container::before {
        left: 30px;
    }
    
    .timeline-item {
        flex-direction: row !important;
        padding: 0;
    }
    
    .timeline-item:nth-child(even) .timeline-content {
        text-align: left;
    }
    
    .timeline-time {
        flex: 0 0 auto;
        order: 2;
        padding-left: 1rem;
    }
    
    .timeline-icon {
        flex: 0 0 50px;
        height: 50px;
        font-size: 1.2rem;
        order: 1;
        margin: 0;
        margin-right: 1rem;
    }
    
    .timeline-content {
        order: 3;
        margin: 0;
        margin-left: 1rem;
    }
    
    .time-text {
        padding: 0.4rem 0.8rem;
    }
}

/* Copy Number Button Styles */
.copy-number-btn {
    border: 1px solid white !important;
    color: var(--primary-color) !important;
    background: white !important;
    transition: all 0.3s ease;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1;
}

.copy-number-btn:hover {
    background: rgba(255, 255, 255, 0.9) !important;
    color: var(--primary-color) !important;
    border-color: white !important;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.copy-number-btn:active {
    transform: scale(0.95);
}

.copy-number-btn i {
    font-size: 0.75rem;
    color: var(--primary-color) !important;
}

/* Toast Notification Styles */
.copy-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
    font-weight: 500;
    color: var(--text-dark);
    max-width: 300px;
}

.copy-toast.success {
    border-left-color: #28a745;
    color: #28a745;
}

.copy-toast.error {
    border-left-color: #dc3545;
    color: #dc3545;
}

.copy-toast.show {
    transform: translateX(0);
    opacity: 1;
}

/* Account number highlighting */
.account-number, .cci-number {
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

/* Mobile toast adjustments */
@media (max-width: 768px) {
    .copy-toast {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .copy-toast.show {
        transform: translateY(0);
    }
    
    .copy-number-btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }
    
    .copy-number-btn i {
        font-size: 0.7rem;
        color: var(--primary-color) !important;
    }
}

/* Floating Music Control Button */
.floating-music-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: none; /* Initially hidden, shown by JavaScript */
}

.floating-music-btn button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-music-btn button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #3a7bc8, #6bb6d6);
}

.floating-music-btn button:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Music Notification */
.music-notification {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    z-index: 1001;
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 90%;
    width: 400px;
}

.music-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.music-notification-content {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
}

.music-notification-content .btn-close {
    background: none;
    border: none;
    color: white;
    opacity: 0.8;
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 10px;
    transition: opacity 0.2s ease;
}

.music-notification-content .btn-close:hover {
    opacity: 1;
}

/* Mobile adjustments for music controls */
@media (max-width: 768px) {
    .floating-music-btn {
        bottom: 15px;
        right: 15px;
    }
    
    .floating-music-btn button {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .music-notification {
        top: 70px;
        width: 95%;
        max-width: none;
    }
    
    .music-notification-content {
        padding: 12px 15px;
        font-size: 22px;
        line-height: 26px;
    }
    
    .music-notification-content .btn-close {
        font-size: 1rem;
    }
}


/*--- Parallax ---*/
.parallax {
  display: block;
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 90vh;
  padding: 50px 0;
  background: none;
  z-index: 1;
  text-align: center;
  overflow: hidden;
}

/* Decorative borders for parallax sections - Paper tear effect */
.parallax::before,
.parallax::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 60px;
  z-index: 2;
  background-size: 100% 60px;
  background-repeat: no-repeat;
}

/* Alternative torn paper patterns for variety */
.parallax::before {
  top: 0;
    background-repeat: repeat-x;
    background-position: bottom left;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='72' viewBox='0 0 120 72'><path d='M0,48 C10,36 22,56 34,44 C46,32 58,60 70,46 C82,32 94,58 106,44 C118,30 120,40 120,72 L0,72 Z' fill='%23ffffff'/></svg>");
    background-size: auto 72px !important;
    transform: rotateZ(180deg);
}

.parallax::after {
  bottom: 0;
    background-repeat: repeat-x;
    background-position: bottom left;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='72' viewBox='0 0 120 72'><path d='M0,48 C10,36 22,56 34,44 C46,32 58,60 70,46 C82,32 94,58 106,44 C118,30 120,40 120,72 L0,72 Z' fill='%23ffffff'/></svg>");
    background-size: auto 72px !important;
}

/* Special styling for sections that follow parallax */
.parallax + section {
  position: relative;
  z-index: 3;
}

/* Enhanced shadow effect for parallax borders */
.parallax::before {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.parallax::after {
  filter: drop-shadow(0 -2px 4px rgba(0,0,0,0.1));
}

/* Ensure parallax sections have proper background for torn effect */
.parallax .plx-img {
  z-index: -1;
}

/* Additional styling for better torn paper effect */
.parallax {
  margin: 0;
  border: none;
}

/* Ensure sections before and after parallax blend properly */
section + .parallax {
  margin-top: -1px;
}

.parallax + section {
  margin-top: -1px;
}

/* Mobile adjustments for decorative borders */
@media (max-width: 768px) {
  .parallax::before,
  .parallax::after {
    height: 40px;
    background-size: 100% 40px;
  }
  
  .parallax {
    height: 60vh;
  }
}
.plx-img {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 125%;
  z-index: -1;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}
.parallax h2 {
  display: block;
  font-size: 60px;
  line-height: 66px;
  font-weight: 700;
  text-align: center;
  color: #ffffff;
}
.parallax p {
  display: block;
  width: 600px;
  max-width: 100%;
  margin: 0 auto;
  font-size: 24px;
  line-height: 28px;
  font-weight: 400;
  text-align: center;
  color: #ffffff;
  text-shadow: 0 1px 5px rgba(0,0,0,0.75);
}
@media screen and (max-width: 767px) {
  .parallax h2 {
    font-size: 40px;
    line-height: 46px;
  }
  .parallax p {
    font-size: 18px;
    line-height: 22px;
  }
}

/* Preloader overlay */
body.preloading {
    overflow: hidden;
}

.preloader {
    position: fixed;
    inset: 0;
    z-index: 20000;
    background: #ffffff;
    background-image: radial-gradient(circle at 20% 20%, rgba(74,144,226,0.08) 0, transparent 60%),
                                        radial-gradient(circle at 80% 30%, rgba(135,206,235,0.08) 0, transparent 55%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}

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

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

.preloader .spinner {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 4px solid rgba(0,0,0,0.08);
    border-top-color: var(--primary-color);
    border-right-color: var(--secondary-color);
    animation: spin 0.9s linear infinite;
    margin: 0 auto;
}

.preloader-text {
    color: var(--text-dark);
    font-weight: 500;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Scroll reveal animations */
.reveal {
        opacity: 0;
        transform: translate3d(var(--reveal-x, 0), var(--reveal-y, 20px), 0);
        transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
        will-change: transform, opacity;
}

.reveal-visible {
        opacity: 1;
        transform: translate3d(0, 0, 0);
}
.p0 {
    padding: 0 !important;
}
.reveal-left { --reveal-x: -40px; --reveal-y: 0; }
.reveal-right { --reveal-x: 40px; --reveal-y: 0; }
.reveal-up { --reveal-x: 0; --reveal-y: 30px; }
.fondo-planta {
    background-image: url('../images/fondo.png'), linear-gradient(180deg,rgba(250, 249, 248, 1) 0%, rgba(255, 255, 255, 1) 100%);
    background-size: contain;
    background-position: top;
    padding: 90px 20px 0;
    background-repeat: no-repeat;
    background-color: #faf9f8;
}
.fondo-planta h2.text-primary-custom {
    padding: 0 70px;
}
.fondo-planta p.lead {
    padding: 0 40px;
}
blockquote.blockquote {
    padding: 0 50px 20px;
}
.botones-apps img {
    display: inline-block;
    max-width: 120px;
    margin: 0 5px 15px;
}
.shadow0 {
    text-shadow: none !important;
}
#principal {
    min-height: 400px;
    background-size: cover;
    padding: 100px 50px 0;
}
#falta {
    background-size: cover;
    min-height: 300px;
    padding: 90px 55px;
}
.pb40 {
    padding-bottom: 40px !important;
}

/* Estilos para mensajes de formulario */
#mensaje-resultado {
    margin-top: 20px;
    border-radius: 10px;
    border: none;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

#mensaje-resultado.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border-left: 4px solid #28a745;
}

#mensaje-resultado.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border-left: 4px solid #dc3545;
}

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

/* Loading state para el botón */
#btn-confirmar:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

#btn-confirmar:disabled:hover {
    transform: none;
    box-shadow: none;
}
@media (max-width: 768px) {
        .reveal-left { --reveal-x: -24px; }
        .reveal-right { --reveal-x: 24px; }
        .reveal-up { --reveal-y: 20px; }
}

@media (prefers-reduced-motion: reduce) {
        .reveal {
                opacity: 1 !important;
                transform: none !important;
                transition: none !important;
        }
}
@media (min-width: 1000px) {
    .fondo-planta {
        background-image: url('../images/fondo2.jpg'), linear-gradient(180deg,rgba(250, 249, 248, 1) 0%, rgba(255, 255, 255, 1) 100%);
        background-position: contain !important;
    }
}