/* 
Electrocarp - Custom CSS
Colores de marca: Primary #1A3760, Secondary #7AB642, Accent #E6E03D
*/

:root {
    --primary-color: #1A3760;
    --secondary-color: #7AB642;
    --accent-color: #E6E03D;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --light-50: rgba(248, 249, 250, 0.5);
    --light-75: rgba(248, 249, 250, 0.75);
}

/* Typography */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.fw-bold { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }

/* Custom Bootstrap Colors */
.bg-primary { background-color: var(--primary-color) !important; }
.bg-secondary { background-color: var(--secondary-color) !important; }
.bg-accent { background-color: var(--accent-color) !important; }

.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.text-accent { color: var(--accent-color) !important; }
.text-light-50 { color: var(--light-50) !important; }
.text-light-75 { color: var(--light-75) !important; }

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 500;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #0f2344;
    border-color: #0f2344;
}

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    font-weight: 500;
}

.btn-secondary:hover, .btn-secondary:focus {
    background-color: #5a8631;
    border-color: #5a8631;
}

.btn-accent {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--dark-color);
    font-weight: 500;
}

.btn-accent:hover, .btn-accent:focus {
    background-color: #d4c935;
    border-color: #d4c935;
    color: var(--dark-color);
}

/* Header & Navigation */
.header-main {
    z-index: 1030;
}

.navbar {
    padding: 0.75rem 0;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 0.25rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--accent-color) !important;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
}

/* Main Content */
.main-content {
    margin-top: 76px; /* Height of fixed navbar */
    min-height: calc(100vh - 76px);
}

/* Cards */
.card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-img-top {
    border-radius: 0;
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 1.5rem;
}

/* Hero Sections */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0f2344 100%);
    color: white;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero .lead {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 2rem;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero .lead {
        font-size: 1.1rem;
    }
}

/* Sections */
.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-title p {
    font-size: 1.1rem;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto;
}

/* Service Cards */
.service-card {
    text-align: center;
    padding: 2rem 1rem;
    border-radius: 1rem;
    background: white;
    height: 100%;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.1);
}

.service-card .service-icon {
    width: 80px;
    height: 80px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--dark-color);
}

.service-card h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Banner/Carousel */
.hero-carousel {
    height: 60vh;
    position: relative;
    overflow: hidden;
}

.hero-carousel .carousel-item {
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-carousel .carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(26, 55, 96, 0.8), rgba(26, 55, 96, 0.4));
}

.hero-carousel .carousel-caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 90%;
    max-width: 800px;
}

.hero-carousel h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-carousel p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-carousel .btn {
    margin: 0 0.5rem;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 50px;
}

@media (max-width: 768px) {
    .hero-carousel {
        height: 50vh;
    }
    
    .hero-carousel h1 {
        font-size: 2rem;
    }
    
    .hero-carousel p {
        font-size: 1rem;
    }
}

/* Project Cards */
.project-card {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.15);
}

.project-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.project-card .project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 2rem 1.5rem 1.5rem;
}

.project-card .project-category {
    background: var(--accent-color);
    color: var(--dark-color);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 0.5rem;
}

/* Contact Form */
.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.form-floating > .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(26, 55, 96, 0.25);
}

.form-floating > label {
    color: #6c757d;
}

/* Footer */
.footer {
    background: var(--dark-color) !important;
    margin-top: auto;
}

.footer h5, .footer h6 {
    color: white;
}

.footer a:hover {
    color: var(--accent-color) !important;
    transition: color 0.3s ease;
}

.social-links a {
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--accent-color) !important;
    transform: translateY(-2px);
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.whatsapp-float .btn {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Back to Top Button */
.btn-back-to-top {
    position: fixed;
    bottom: 8rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.btn-back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.btn-back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Breadcrumbs */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 2rem;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--secondary-color);
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* Alerts/Flash Messages */
.alert {
    border: none;
    border-radius: 0.75rem;
    font-weight: 500;
}

.alert-success {
    background-color: rgba(122, 182, 66, 0.1);
    color: var(--secondary-color);
    border-left: 4px solid var(--secondary-color);
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background-color: rgba(230, 224, 61, 0.1);
    color: #856404;
    border-left: 4px solid var(--accent-color);
}

.alert-info {
    background-color: rgba(26, 55, 96, 0.1);
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
}

/* FAQ */
.faq-item {
    border: none;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.faq-item .btn {
    background: white;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    text-align: left;
    padding: 1.25rem 1.5rem;
    border-radius: 0.75rem;
}

.faq-item .btn:hover, .faq-item .btn:focus {
    background: var(--light-color);
    color: var(--primary-color);
}

.faq-item .collapse {
    padding: 0 1.5rem 1.25rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .section {
        padding: 3rem 0;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .hero-carousel .btn {
        padding: 0.5rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .whatsapp-float {
        bottom: 1rem;
        right: 1rem;
    }
    
    .btn-back-to-top {
        bottom: 6rem;
        right: 1rem;
    }
}

/* Print styles */
@media print {
    .header-main,
    .footer,
    .whatsapp-float,
    .btn-back-to-top {
        display: none !important;
    }
    
    .main-content {
        margin-top: 0;
    }
}