/* ===================================
   CBR MOLINA - ESTILOS PRINCIPALES
   Archivo: recursos_cbr/estilos_v2/principal.css
   =================================== */

/* Variables */
:root {
    --primary-color: #1E3A8A;
    --secondary-color: #3B82F6;
    --success-color: #10B981;
    --danger-color: #EF4444;
    --dark-color: #1F2937;
    --light-color: #F8FAFC;
    --text-color: #374151;
    --text-secondary: #6B7280;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

a {
    transition: all 0.3s ease;
}

/* Top Bar */
.top-bar {
    font-size: 0.9rem;
}

.top-bar a:hover {
    opacity: 0.8;
}

/* Header */
.header-main {
    padding: 0.5rem 0;
}

.navbar-brand img {
    max-height: 60px;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    color: var(--text-color);
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

/* Hero Principal */
.hero-principal {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 5rem 0;
    color: white;
}

.hero-principal h1,
.hero-principal h2 {
    color: white;
}

.hero-principal .lead {
    color: rgba(255, 255, 255, 0.9);
}

.min-vh-70 {
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.hero-content {
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Servicios Principales */
.servicios-principales {
    background: #f8f9fa;
}

.servicio-card {
    background: white;
    border-radius: 15px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.servicio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.servicio-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.servicio-icon i {
    font-size: 2.5rem;
    color: white;
}

.servicio-card:hover .servicio-icon {
    transform: scale(1.1) rotate(5deg);
}

.servicio-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.servicio-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.servicio-badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

.servicio-card:hover .servicio-badge {
    opacity: 1;
    transform: translateX(0);
}

.servicio-badge i {
    color: white;
    font-size: 1.2rem;
}

/* Sobre Conservador */
.sobre-conservador {
    background: #f8f9fa;
}

.jurisdiccion-box {
    animation: fadeIn 0.5s ease;
}

.comuna-item {
    padding: 0.5rem 0;
    font-size: 1.1rem;
}

/* Info Cards */
.info-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

.info-card-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-card-header i {
    font-size: 1.5rem;
}

.info-card-header h5 {
    margin: 0;
    font-size: 1rem;
}

.info-card-body {
    padding: 1.5rem;
}

/* Info Boxes */
.info-box {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.info-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.info-box-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.info-box-icon i {
    font-size: 2rem;
    color: white;
}

.info-box h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.info-box-content p {
    margin-bottom: 0.5rem;
}

.info-box-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.info-box-content a:hover {
    text-decoration: underline;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.75rem 2rem;
    font-weight: 600;
}

.btn-primary:hover {
    background-color: #1e40af;
    border-color: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    border-width: 2px;
    padding: 0.75rem 2rem;
    font-weight: 600;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-outline-light:hover {
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background-color: #1F2937 !important;
}

.footer h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer ul li {
    margin-bottom: 0.5rem;
}

.footer a:hover {
    color: #fff !important;
}

/* Back to Top Button */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#backToTop:hover {
    transform: translateY(-5px);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-principal {
        padding: 3rem 0;
    }
    
    .hero-principal h1 {
        font-size: 2rem;
    }
    
    .hero-principal h2 {
        font-size: 1.5rem;
    }
    
    .servicio-card {
        padding: 2rem 1.5rem;
    }
    
    .info-box {
        padding: 1.5rem;
    }
    
    .top-bar {
        font-size: 0.8rem;
        text-align: center;
    }
    
    .top-bar .col-md-7,
    .top-bar .col-md-5 {
        text-align: center !important;
    }
    
    #backToTop {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* Utilities */
.text-primary {
    color: var(--primary-color) !important;
}

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

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.gap-3 {
    gap: 1rem !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}