/* ===== RESET Y CONFIGURACIÓN GENERAL ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER Y NAVEGACIÓN ===== */
header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: 80px;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    height: 80px;
}

.logo-header-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-header-img {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-header-img:hover {
    transform: scale(1.05);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    height: 60px;
    width: auto;
}

.logo-text h1 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin: 0;
}

.logo-text span {
    color: #e74c3c;
}

nav a {
    margin-left: 2rem;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a.active, 
nav a:hover {
    color: #e74c3c;
}

/* Estilo para link de inversiones */
nav a.inversiones {
    color: #27ae60;
    font-weight: 600;
}

nav a.inversiones:hover {
    color: #229954;
}

/* ===== CARRUSEL ===== */
.carousel-container {
    width: 100%;
    max-width: 1200px;
    margin: 80px auto 0 auto;
    position: relative;
    overflow: hidden;
    padding: 0 20px;
    box-sizing: border-box;
}

.carousel-slide {
    display: none;
    width: 100%;
    min-height: 250px;
    overflow: hidden;
    background-color: #f8f9fa;
}

.carousel-slide img {
    width: 100%;
    height: 250px;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

.carousel-active {
    display: block;
}

/* Estilos para el slide con logo HTML */
.carousel-slide.slide-logo {
    background-color: #f8f9fa;
    min-height: 250px;
    height: 250px;
}

.carousel-slide.slide-logo.carousel-active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide.slide-logo .logo-container {
    background: linear-gradient(135deg, #1d3f77 0%, #2c5aa0 100%);
    width: 900px;
    height: 250px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 40px;
}

.slide-logo .logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.slide-logo .logo-roces-row {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.slide-logo .logo-r {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Monotype Corsiva', cursive;
    font-size: 70px;
    color: white;
    font-style: italic;
    margin-right: -20px;
    z-index: 1;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.slide-logo .logo-roces {
    font-family: 'Brush Script MT', cursive;
    font-size: 80px;
    color: white;
    font-style: italic;
    line-height: 1;
    padding-left: 25px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.slide-logo .logo-subtitle {
    font-family: Georgia, serif;
    font-size: 20px;
    color: white;
    letter-spacing: 10px;
    text-transform: uppercase;
    border-top: 2px solid white;
    padding-top: 8px;
    margin-top: 8px;
    white-space: nowrap;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.carousel-nav {
    text-align: center;
    margin-top: 15px;
}

.carousel-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: #ccc;
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
}

.carousel-dot.active {
    background: #333;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 18px;
    z-index: 10;
    border-radius: 4px;
}

.prev-btn {
    left: 30px;
}

.next-btn {
    right: 30px;
}

/* ===== HERO SECTION ===== */
.hero {
    background: url('imagenes/slidernegro.jpg') center center no-repeat;
    background-size: contain;
    background-color: #f8f9fa;
    min-height: 250px;
    margin-top: 80px;
    padding: 40px 0;
}

.hero-contacto {
    background: url('imagenes/sliderblanco.jpg') center center no-repeat !important;
    background-size: contain !important;
    background-color: white !important;
    min-height: 250px !important;
    margin-top: 80px !important;
    padding: 40px 0 !important;
}

.hero-servicios {
    background: url('imagenes/sliderblanco.jpg') center center no-repeat !important;
    background-size: contain !important;
    background-color: white !important;
    min-height: 250px !important;
    margin-top: 80px !important;
    padding: 40px 0 !important;
}

.hero .container {
    /* Contenedor vacío para el slider */
}

/* ===== PÁGINA DE CONTACTO ===== */
.contact-page-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 3rem 0;
}

.contact-page-title {
    color: #2c3e50;
    margin-bottom: 2rem;
    text-align: center;
}

.map-container {
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin: 1rem 0;
}

/* ===== PÁGINA DE SERVICIOS ===== */
.services-page-title {
    text-align: center;
    margin: 2rem 0;
}

.service-category {
    margin: 3rem 0;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.service-category h3 {
    color: #2c3e50;
    border-left: 4px solid #e74c3c;
    padding-left: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.service-item {
    padding: 1.2rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #3498db;
    text-align: center;
    transition: transform 0.3s ease;
}

.service-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* ===== SECCIÓN DE SERVICIOS (INDEX) ===== */
.services-listing {
    background: #f8f9fa;
    padding: 3rem 0;
    margin: 2rem 0;
}

.services-listing h2 {
    text-align: center;
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 2rem;
}

.services-list {
    list-style: none;
    padding: 0;
    max-width: 800px;
    margin: 0 auto 20px auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    text-align: left;
}

.services-list li {
    background: white;
    padding: 15px;
    border-left: 4px solid #2c3e50;
    margin: 0;
}

/* ===== SECCIÓN BIENVENIDA ===== */
.welcome-section {
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

.welcome-section h2 {
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 2rem;
}

.welcome-content {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
    font-size: 1.1rem;
}

.welcome-content p {
    margin-bottom: 1.5rem;
    color: #555;
}

.welcome-content strong {
    color: #2c3e50;
}

/* ===== SECCIÓN DE CONTACTO (INDEX) ===== */
.contact-info {
    padding: 3rem 0;
}

.contact-info h2 {
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 2rem;
    text-align: center;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 800px;
    margin: 20px auto;
}

.contact-item {
    background: white;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    background: #f8f9fa;
}

.contact-item h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.contact-item p {
    color: #666;
    margin: 0;
}

/* ===== BOTONES ===== */
.center-button {
    text-align: center;
    margin: 2rem 0;
}

.btn-primary {
    display: inline-block;
    padding: 1rem 2rem;
    background: #2c3e50;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: #34495e;
    transform: translateY(-2px);
}

/* Efectos especiales para botones principales */
.btn-primary {
    background: linear-gradient(135deg, #1d3f77 0%, #2c5aa0 50%, #3d8ed7 100%);
    box-shadow: 0 4px 15px rgba(29, 63, 119, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2c5aa0 0%, #3d8ed7 50%, #5dade2 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(29, 63, 119, 0.5);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(29, 63, 119, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(61, 142, 215, 0.6);
    }
    100% {
        box-shadow: 0 4px 15px rgba(29, 63, 119, 0.4);
    }
}

.btn-primary {
    animation: pulse 2s infinite;
}

.btn-primary:hover {
    animation: none;
}

/* ===== ENLACES ESPECIALES ===== */
.whatsapp-link {
    color: #25D366;
    text-decoration: none;
    font-weight: bold;
}

.whatsapp-link:hover {
    text-decoration: underline;
}

.email-link {
    color: #e74c3c;
    text-decoration: none;
    font-weight: bold;
}

.email-link:hover {
    text-decoration: underline;
}

/* ===== FOOTER ===== */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-logo {
    margin-bottom: 1rem;
}

.footer-logo-img {
    height: 40px !important;
    width: auto;
    margin-bottom: 0.5rem;
}

.footer-text h3 {
    color: white;
    margin: 0;
}

footer p {
    margin: 0.5rem 0;
    opacity: 0.9;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    /* HEADER MÁS COMPACTO */
    header {
        height: auto;
        position: relative;
        box-shadow: 0 1px 5px rgba(0,0,0,0.1);
    }
    
    header .container {
        flex-direction: column;
        text-align: center;
        padding: 0.8rem;
        height: auto;
        gap: 0.8rem;
    }
    
    .logo-header-container {
        justify-content: center;
        margin-bottom: 0.5rem;
        gap: 10px;
    }
    
    .logo-header-img {
        height: 40px;
    }
    
    .logo-container {
        justify-content: center;
        margin-bottom: 0.5rem;
    }
    
    .logo-text h1 {
        font-size: 1.5rem;
    }
    
    .logo-img {
        height: 45px;
    }
    
    nav {
        margin-top: 0;
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav a {
        margin: 0;
        padding: 0.5rem 1rem;
        background: #f8f9fa;
        border-radius: 20px;
        font-size: 0.9rem;
        transition: all 0.3s ease;
    }
    
    nav a.active,
    nav a:hover {
        background: #e74c3c;
        color: white;
    }
    
    /* CARRUSEL RESPONSIVE */
    .carousel-container {
        margin: 60px auto 0 auto !important;
        padding: 0 10px;
    }
    
    .carousel-slide,
    .carousel-slide img {
        min-height: 180px;
        height: 180px;
    }
    
    /* Responsive para el logo del slider */
    .carousel-slide.slide-logo {
        min-height: 180px;
        height: 180px;
    }
    
    .carousel-slide.slide-logo .logo-container {
        width: 100%;
        height: 180px;
        padding: 15px 20px;
    }
    
    .slide-logo .logo-r {
        width: 60px;
        height: 60px;
        font-size: 50px;
        margin-right: -15px;
    }
    
    .slide-logo .logo-roces {
        font-size: 55px;
        padding-left: 18px;
    }
    
    .slide-logo .logo-subtitle {
        font-size: 14px;
        letter-spacing: 6px;
        padding-top: 6px;
        margin-top: 6px;
    }
    
    .carousel-btn {
        padding: 6px 10px;
        font-size: 14px;
    }
    
    .prev-btn {
        left: 15px;
    }
    
    .next-btn {
        right: 15px;
    }
    
    /* HERO/SLIDER RESPONSIVE */
    .hero {
        margin-top: 0;
        padding: 20px 0;
        min-height: 180px;
    }
    
    .hero-contacto {
        margin-top: 60px !important;
        padding: 20px 0 !important;
        min-height: 180px !important;
    }
    
    .hero-servicios {
        margin-top: 20px !important;
        padding: 20px 0 !important;
        min-height: 180px !important;
    }
    
    /* CONTACTO PAGE RESPONSIVE */
    .contact-page-grid {
        display: block !important;
        grid-template-columns: none !important;
        gap: 0 !important;
        margin: 2rem 0;
    }
    
    .contact-page-grid > div {
        width: 100% !important;
        margin: 0 0 2rem 0 !important;
        padding: 1rem !important;
    }
    
    .map-container {
        height: 200px !important;
        width: 100% !important;
        margin: 1rem 0 !important;
    }
    
    .map-container iframe {
        height: 200px !important;
    }
    
    /* SERVICIOS PAGE RESPONSIVE */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .service-category {
        margin: 2rem 0;
        padding: 1.5rem;
    }
    
    .service-category h3 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }
    
    .service-item {
        padding: 1rem;
        font-size: 0.95rem;
        text-align: left;
    }
    
    .services-page-title h2 {
        font-size: 1.6rem !important;
        margin: 1.5rem 0 !important;
    }
    
    /* SERVICIOS LIST RESPONSIVE (INDEX) */
    .services-list {
        grid-template-columns: 1fr;
        margin: 0 auto 20px auto;
        gap: 10px;
    }
    
    .services-list li {
        padding: 12px;
        font-size: 0.95rem;
    }
    
    /* WELCOME SECTION COMPACTA */
    .welcome-section {
        padding: 2rem 0;
        margin-bottom: 1.5rem;
    }
    
    .welcome-content {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .welcome-content p {
        margin-bottom: 1rem;
        font-size: 0.95rem;
    }
    
    /* CONTACT GRID RESPONSIVE (INDEX) */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin: 20px auto;
    }
    
    .contact-item {
        padding: 15px;
    }
    
    .contact-item h4 {
        font-size: 1.1rem;
    }
    
    .contact-item p {
        font-size: 0.95rem;
    }
    
    /* TIPOGRAFÍA OPTIMIZADA */
    .services-listing h2,
    .welcome-section h2,
    .contact-info h2 {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }
    
    /* BOTONES OPTIMIZADOS */
    .btn-primary {
        font-size: 0.95rem;
        padding: 0.8rem 1.5rem;
        display: inline-block;
        text-align: center;
    }
    
    /* FOOTER COMPACTO */
    footer {
        padding: 1.5rem 0;
        margin-top: 2rem;
    }
    
    footer p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .footer-logo-img {
        height: 35px !important;
    }
    
    /* CONTENEDORES GENERALES */
    body .container {
        padding: 0 15px !important;
    }
    
    /* ESPACIADO GLOBAL OPTIMIZADO */
    .services-listing {
        margin-bottom: 1.5rem;
        padding: 2rem 0;
    }
}

/* MOBILE PORTRAIT (celular vertical) */
@media (max-width: 768px) and (orientation: portrait) {
    .hero-contacto {
        margin-top: 60px !important;
    }
}

/* MOBILE LANDSCAPE (celular horizontal) */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-contacto {
        margin-top: 0px !important;
    }
}

@media (max-width: 480px) {
    /* PANTALLAS MUY PEQUEÑAS */
    .logo-header-img {
        height: 35px;
    }
    
    .logo-text h1 {
        font-size: 1.3rem;
    }
    
    .logo-img {
        height: 40px;
    }
    
    .carousel-container {
        margin: 70px auto 0 auto !important;
        padding: 0 5px;
    }
    
    .carousel-slide,
    .carousel-slide img {
        min-height: 150px;
        height: 150px;
    }
    
    /* Responsive para el logo del slider en pantallas pequeñas */
    .carousel-slide.slide-logo {
        min-height: 150px;
        height: 150px;
    }
    
    .carousel-slide.slide-logo .logo-container {
        height: 150px;
        padding: 10px 15px;
    }
    
    .slide-logo .logo-r {
        width: 50px;
        height: 50px;
        font-size: 40px;
        margin-right: -12px;
    }
    
    .slide-logo .logo-roces {
        font-size: 45px;
        padding-left: 15px;
    }
    
    .slide-logo .logo-subtitle {
        font-size: 11px;
        letter-spacing: 4px;
    }
    
    .hero {
        min-height: 150px;
        padding: 15px 0;
    }
    
    nav a {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .services-listing h2,
    .welcome-section h2,
    .contact-info h2 {
        font-size: 1.4rem;
    }
    
    .services-list li {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .welcome-content p {
        font-size: 0.9rem;
    }
    
    .contact-item {
        padding: 12px;
    }
    
    .btn-primary {
        font-size: 0.9rem;
        padding: 0.7rem 1.2rem;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .footer-logo-img {
        height: 30px !important;
    }
    
    /* SERVICIOS PAGE - PANTALLAS MUY PEQUEÑAS */
    .service-category {
        padding: 1rem;
        margin: 1.5rem 0;
    }
    
    .service-category h3 {
        font-size: 1.2rem;
    }
    
    .service-item {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
}