* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #171717;
    background-color: #d4e6f8;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* ===================================
   Header & Navigation
   =================================== */
header {
    background: linear-gradient(135deg, #0559d7ff 0%, #0434a3ff 100%);
    color: white;
    padding: 1rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    flex: 0 0 auto;
}

.logo {
    height: 60px;
    width: auto;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: white;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: white;
    transition: width 0.3s ease;
}

nav a:hover,
nav a.active {
    background-color: rgba(255, 255, 255, 0.1);
}

nav a:hover::after,
nav a.active::after {
    width: 80%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ===================================
   Main Content Spacing
   =================================== */
main {
    margin-top: 80px;
}

section {
    padding: 4rem 0;
    width: 100%;
}

section > * {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

section h2 {
    font-size: 2.5rem;
    color: #0434a3ff;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #206acb, #0444a3);
    border-radius: 2px;
}

/* ===================================
   Inicio Section
   =================================== */
#inicio {
    background: linear-gradient(135deg, #058ad7 0%, #0467a3 100%);
    color: white;
    text-align: center;
    padding: 8rem 2rem 6rem;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

#inicio::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="white" opacity="0.1"/></svg>');
    opacity: 0.3;
}

.hero-content {
    max-width: auto;
    margin: auto;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(5px);
    animation: fadeInUp 0.8s ease;
}

.hero-badge i {
    color: #ffffff;
    font-size: 1.2rem;
}

#inicio h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    animation: fadeInUp 1s ease 0.2s both;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.95);
    animation: fadeInUp 1s ease 0.3s both;
}

.hero-description {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.5s both;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.feature-item i {
    font-size: 2rem;
    color: white;
}

.feature-item span {
    font-size: 0.9rem;
    font-weight: 500;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.6s both;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: white;
    color: #0434a3ff;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background-color: #f0f0f0;
}

.btn-secondary {
    background-color: white;
    color: #0434a3ff;
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: rgb(255, 255, 255);
    color: #0434a3ff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* ===================================
   Nosotros Section
   =================================== */
#nosotros {
    background-color: white;
}

.nosotros-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .nosotros-container {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }
}

.nosotros-content h3 {
    color: #0434a3ff;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.nosotros-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #2c2c2d;
    text-align: justify;
}

.valores-section {
    margin-top: 3rem;
}

.valores-section h3 {
    color: #0434a3ff;
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.valores-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.valor-item {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #0434a3ff;
    transition: all 0.3s ease;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.valor-item:hover {
    transform: translateX(10px);
    box-shadow: 0 4px 15px rgba(5, 138, 215, 0.2);
}

.valor-item i {
    color: #0434a3ff;
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.valor-content {
    flex: 1;
}

.valor-item h4 {
    color: #0434a3ff;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.valor-item p {
    color: #666;
    margin: 0;
    line-height: 1.6;
}

.nosotros-imagen {
    margin-top: 2rem;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.nosotros-imagen img {
    width: 100%;
    transition: transform 0.5s ease;
}

.nosotros-imagen:hover img {
    transform: scale(1.05);
}

/* ===================================
   Equipo Section
   =================================== */
#equipo {
    background-color: #f8f9fa;
}

.equipo-intro {
    max-width: 900px;
    margin: 0 auto 3rem;
    text-align: center;
}

.equipo-intro p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 2rem;
}

.equipo-especialidades {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    max-width: 1000px;
    margin: 2rem auto;
}

.equipo-especialidades li {
    background-color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.equipo-especialidades li:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(5, 138, 215, 0.2);
}

.equipo-especialidades i {
    color: #058ad7;
    font-size: 1.2rem;
}

.equipo-galeria {
    margin-top: 3rem;
}

.equipo-galeria h3 {
    text-align: center;
    color: #058ad7;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.equipo-fotos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.galeria-foto {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.galeria-foto:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 30px rgba(5, 138, 215, 0.3);
}

.galeria-foto img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

/* ===================================
   Servicios Section
   =================================== */
#servicios {
    background-color: white;
}

.servicios {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.servicio-card {
    background-color: #f8f9fa;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.servicio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(5, 138, 215, 0.3);
}

.servicio-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #058ad7, #0467a3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
}

.servicio-card:hover .servicio-icon {
    transform: rotate(360deg);
}

.servicio-icon i {
    font-size: 2.5rem;
    color: white;
}

.servicio-card h3 {
    color: #058ad7;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.servicio-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.servicio-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin: 1.5rem 0;
}

.servicio-card button {
    background: linear-gradient(135deg, #058ad7, #0467a3);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.servicio-card button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(5, 138, 215, 0.4);
}

/* ===================================
   Clientes Section
   =================================== */
#clientes {
    background-color: #f8f9fa;
}

.carousel-container {
    margin-top: 2rem;
}

.carousel-wrapper {
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-item {
    min-width: 100%;
    background-color: white;
    padding: 2rem;
}

.carousel-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.case-info h3 {
    color: #058ad7;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.case-info p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.8;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
}

.carousel-control {
    background: linear-gradient(135deg, #058ad7, #0467a3);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-control:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(5, 138, 215, 0.4);
}

.carousel-indicators {
    display: flex;
    gap: 0.5rem;
}

.carousel-indicators .indicator {
    width: 12px;
    height: 12px;
    background-color: #ccc;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicators .indicator.active {
    background-color: #058ad7;
    width: 30px;
    border-radius: 6px;
}

/* ===================================
   Contacto Section
   =================================== */
#contacto {
    background-color: white;
}

form {
    max-width: 600px;
    margin: 0 auto;
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

fieldset {
    border: 2px solid #058ad7;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

legend {
    color: #058ad7;
    font-weight: 600;
    font-size: 1.2rem;
    padding: 0 1rem;
}

form div {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    color: #333;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #058ad7;
    box-shadow: 0 0 0 3px rgba(5, 138, 215, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

select {
    cursor: pointer;
    background-color: white;
}

button[type="submit"] {
    width: 100%;
    background: linear-gradient(135deg, #058ad7, #0467a3);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(5, 138, 215, 0.4);
}

/* ===================================
   Footer
   =================================== */
footer {
    background: linear-gradient(135deg, #0467a3 0%, #033e5c 100%);
    color: white;
    padding: 3rem 2rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.footer-section p,
.footer-section address {
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    font-style: normal;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
    text-decoration: underline;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section i {
    margin-right: 0.5rem;
    color: #058ad7;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

/* ===================================
   Back to Top Button
   =================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #058ad7, #0467a3);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible,
.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(5, 138, 215, 0.5);
}

/* ===================================
   Animations
   =================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 768px) {
    header {
        flex-wrap: wrap;
        padding: 1rem;
    }

    .menu-toggle {
        display: flex;
    }

    nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        margin-top: 1rem;
    }

    nav.active {
        display: flex;
    }

    nav a {
        width: 100%;
        text-align: center;
        padding: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    #inicio {
        padding: 6rem 1rem 4rem;
        min-height: 70vh;
    }

    #inicio h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-features {
        gap: 1rem;
    }

    .feature-item {
        padding: 0.75rem;
        min-width: 120px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    section {
        padding: 3rem 0;
    }
    
    section > * {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    section h2 {
        font-size: 2rem;
    }

    .servicios {
        grid-template-columns: 1fr;
    }

    .equipo-especialidades {
        grid-template-columns: 1fr;
    }

    .equipo-fotos {
        grid-template-columns: 1fr;
    }

    .nosotros-container {
        grid-template-columns: 1fr;
    }

    .valores-list {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .logo {
        height: 45px;
    }

    #inicio {
        padding: 4rem 1rem;
    }

    #inicio h1 {
        font-size: 1.5rem;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    section h2 {
        font-size: 1.5rem;
    }

    form {
        padding: 1.5rem;
    }
}
