:root {
    --primary-color: #4361ee;
    --primary-dark: #3a56d4;
    --secondary-color: #2d3142;
    --accent-color: #4cc9f0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --text-color: #333;
    --text-light: #6c757d;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --shadow-sm: 0 .125rem .25rem rgba(0,0,0,.075);
    --shadow-md: 0 .5rem 1rem rgba(0,0,0,.15);
    --shadow-lg: 0 1rem 3rem rgba(0,0,0,.175);
    --transition-fast: all 0.3s ease;
    --transition-smooth: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    --border-radius-sm: 0.25rem;
    --border-radius: 0.5rem;
    --border-radius-lg: 1rem;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--white);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* Animation utilities */
[data-anim] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-anim="fade-right"] {
    transform: translateX(-20px);
}

[data-anim="fade-left"] {
    transform: translateX(20px);
}

[data-anim="zoom-in"] {
    transform: scale(0.95);
}

[data-anim="flip-up"] {
    transform: perspective(500px) rotateX(-10deg);
}

[data-anim].visible {
    opacity: 1;
    transform: none;
}

/* Animaciones mejoradas */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translate3d(-40px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translate3d(40px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale3d(0.9, 0.9, 0.9);
    }
    to {
        opacity: 1;
        transform: scale3d(1, 1, 1);
    }
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(67, 97, 238, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(67, 97, 238, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(67, 97, 238, 0);
    }
}

@keyframes borderPulse {
    0% {
        border-color: rgba(67, 97, 238, 0.4);
    }
    50% {
        border-color: rgba(67, 97, 238, 0.8);
    }
    100% {
        border-color: rgba(67, 97, 238, 0.4);
    }
}

@keyframes floatY {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

@keyframes gradientBg {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Header & Navigation */
.navbar {
    padding: 1rem 0;
    transition: var(--transition-fast);
    background-color: rgba(45, 49, 66, 0.95) !important;
    box-shadow: var(--shadow-sm);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    background-color: rgba(33, 37, 41, 0.98) !important;
    box-shadow: var(--shadow-md);
}

.navbar-brand img {
    max-height: 50px;
    transition: var(--transition-fast);
}

.nav-link {
    position: relative;
    padding: 0.5rem 1rem !important;
    margin: 0 0.2rem;
    color: var(--white) !important;
    font-weight: 500;
    transition: var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.navbar .nav-link::after {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.navbar .nav-link:hover::after {
    transform: scaleX(1);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.nav-link:hover, 
.nav-link.active {
    color: var(--accent-color) !important;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.7)), 
                url('../img/hero-bg.png');
    background-size: cover;
    background-position: center;
    position: relative;
    color: var(--white);
    display: flex;
    align-items: center;
    padding: 6rem 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(67, 97, 238, 0.3),
        rgba(76, 201, 240, 0.3)
    );
    opacity: 0.4;
}

.hero-content {
    max-width: 650px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(5px);
}

.hero-badge i {
    margin-right: 0.75rem;
    color: var(--accent-color);
    font-size: 1.25rem;
}

.accent-text {
    color: var(--accent-color);
    position: relative;
    display: inline-block;
}

.accent-text::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-color);
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn {
    border-radius: var(--border-radius);
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: var(--transition-fast);
    overflow: hidden;
    position: relative;
    z-index: 1;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                background-color 0.3s ease,
                color 0.3s ease,
                box-shadow 0.3s ease;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    z-index: -1;
    transition: var(--transition-fast);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.2);
    transition: left 0.6s ease;
    z-index: -1;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover::after {
    left: 0;
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-outline-light:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Section Styling */
.section-padding {
    padding: 6rem 0;
}

.section-dark {
    background-color: var(--gray-100);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.section-title::before {
    content: attr(data-shadow);
    position: absolute;
    top: -2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 5rem;
    opacity: 0.03;
    font-weight: 800;
    white-space: nowrap;
    width: 100%;
    text-align: center;
}

.section-divider {
    height: 4px;
    width: 70px;
    background-color: var(--primary-color);
    margin: 0 auto 2rem;
    border-radius: var(--border-radius-sm);
}

/* Info Cards */
.info-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                box-shadow 0.4s ease-in-out,
                border-top-color 0.3s ease;
    border-top: 4px solid var(--primary-color);
}

.info-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-top-color: var(--accent-color);
}

.card-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(67, 97, 238, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.info-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
    background-color: rgba(67, 97, 238, 0.2);
}

.info-card h4 {
    margin-bottom: 1rem;
}

.values-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.value-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Features */
.feature-item {
    display: flex;
    margin-bottom: 2rem;
}

.feature-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background-color: rgba(67, 97, 238, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.feature-item:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    background-color: rgba(67, 97, 238, 0.2);
}

.feature-item h5 {
    margin-bottom: 0.5rem;
}

.location-info {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background-color: rgba(67, 97, 238, 0.1);
    border-radius: var(--border-radius);
}

.location-info i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 1rem;
}

.location-info p {
    margin-bottom: 0;
}

/* Carousel */
.carousel-modern {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.carousel-modern .carousel-item img {
    height: 500px;
    object-fit: cover;
    transition: transform 1.5s ease, filter 1s ease;
}

.carousel-modern:hover .carousel-item img {
    filter: saturate(1.1);
}

.carousel-modern .carousel-item.active img {
    transform: scale(1.02);
}

.carousel-modern .carousel-caption {
    background: rgba(0, 0, 0, 0.6);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    bottom: 2rem;
    width: 80%;
    left: 10%;
    right: 10%;
}

/* Team Cards */
.team-card {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background-color: var(--white);
    margin-bottom: 2rem;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                box-shadow 0.5s ease;
}

.team-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.team-img-container {
    position: relative;
    overflow: hidden;
}

.team-img-container img {
    transition: transform 1.2s cubic-bezier(0.215, 0.610, 0.355, 1);
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.team-card:hover .team-img-container img {
    transform: scale(1.08);
}

.team-social {
    position: absolute;
    bottom: -60px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    transition: var(--transition-fast);
}

.team-card:hover .team-social {
    bottom: 0;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
    transition: var(--transition-fast);
}

.social-icon:hover {
    background-color: var(--accent-color);
    color: var(--secondary-color);
}

.team-info {
    padding: 1.5rem;
    text-align: center;
}

.team-info h4 {
    margin-bottom: 0.25rem;
}

.team-info p {
    color: var(--text-light);
}

/* Contact Form */
.contact-form {
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
}

.form-control {
    border-radius: var(--border-radius);
    padding: 0.75rem 1.25rem;
    height: auto;
    border: 1px solid var(--gray-300);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.form-control:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

.form-floating>.form-control {
    height: calc(3.5rem + 2px);
    padding: 1rem 0.75rem;
}

.form-floating>.form-control:focus {
    border-width: 2px;
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.1);
    transform: translateY(-2px);
}

.form-floating>textarea.form-control {
    height: 150px;
}

.form-floating>label {
    padding: 1rem 0.75rem;
}

/* Footer */
.footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 5rem 0 2rem;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(
        to right,
        var(--primary-color),
        var(--accent-color),
        var(--primary-color)
    );
    background-size: 200% 100%;
    animation: gradientBg 15s ease infinite;
}

.footer-logo {
    max-width: 180px;
    transition: transform 0.5s ease;
}

.footer-logo:hover {
    transform: scale(1.05);
}

.footer-text {
    color: var(--gray-300);
    margin-bottom: 1.5rem;
}

.footer-contact p {
    margin-bottom: 0.5rem;
}

.footer-heading {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--gray-300);
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    transition: transform 0.4s cubic-bezier(0.215, 0.610, 0.355, 1),
                background-color 0.3s ease;
}

.social-link:hover {
    transform: translateY(-8px) rotate(5deg);
    background-color: var(--accent-color);
    color: var(--secondary-color);
}

.newsletter .input-group {
    border-radius: var(--border-radius);
    overflow: hidden;
}

.newsletter .form-control {
    border-right: none;
}

.newsletter .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 2rem 0;
}

.copyright {
    color: var(--gray-300);
    font-size: 0.9rem;
}

.copyright a {
    color: var(--accent-color);
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    z-index: 99;
    transition: var(--transition-fast);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    color: var(--white);
    transform: translateY(-5px);
}

/* Notifications */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.notification {
    background: var(--white);
    max-width: 350px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin-bottom: 1rem;
    animation: slideIn 0.5s forwards;
    opacity: 0;
    transform: translateX(100%);
    position: relative;
}

.notification.success {
    border-left: 4px solid #28a745;
}

.notification.error {
    border-left: 4px solid #dc3545;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification-content {
    padding: 1.5rem;
}

.notification-title {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.notification-title i {
    margin-right: 0.5rem;
}

.notification-message {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(67, 97, 238, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Styles */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: rgba(33, 37, 41, 0.95);
        padding: 1rem;
        border-radius: var(--border-radius);
        margin-top: 1rem;
    }
    
    .section-padding {
        padding: 4rem 0;
    }
    
    .hero-section {
        text-align: center;
        padding: 5rem 0;
    }
    
    .hero-content {
        margin: 0 auto;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .carousel-modern .carousel-item img {
        height: 350px;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .section-title {
        font-size: 2rem;
    }
    
    .feature-item {
        flex-direction: column;
    }
    
    .feature-icon {
        margin-bottom: 1rem;
        margin-right: 0;
    }
    
    .hero-section {
        min-height: auto;
    }
    
    .hero-content {
        padding: 2rem 0;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .footer {
        padding: 3rem 0 2rem;
    }
}

@media (max-width: 575.98px) {
    .hero-badge {
        padding: 0.5rem 1rem;
    }
    
    .section-padding {
        padding: 3rem 0;
    }
    
    .carousel-modern .carousel-item img {
        height: 250px;
    }
    
    .carousel-modern .carousel-caption {
        width: 90%;
        left: 5%;
        right: 5%;
        padding: 1rem;
    }
}