/*
* ===================================================
*     TABLE OF CONTENTS
* ===================================================
*
* 1. Root & General Styles
* 2. Components
*    - Buttons
*    - Section Title
* 3. Sections
*    - Navigation Bar
*    - Hero Section (Inicio)
*    - Services Section
*    - Certifications Section
*    - Footer
*
* ===================================================
*/

/* 1. Root & General Styles
/* ============================================= */
:root {
    --primary-color: #C75C2B;
    --primary-hover-color: #a64b20;
    --text-dark: #212529;
    --text-light: #555;
    --background-light: #ffffff;
    --font-primary: 'Poppins', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    background-color: var(--background-light);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
}

/* 2. Components
/* ============================================= */
.section-title {
    color: var(--text-dark);
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-hover-color);
    border-color: var(--primary-hover-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.linkedin-logo-link img {
    height: 35px;
    transition: opacity 0.3s ease;
    opacity: 0.8;
}

.linkedin-logo-link:hover img {
    opacity: 1;
}


/* 3. Sections
/* ============================================= */
.navbar {
    transition: all 0.3s;
}

.navbar-brand {
    font-weight: 700;
    color: var(--text-dark) !important;
}

.nav-link {
    color: var(--text-light) !important;
    font-weight: 400;
    transition: color 0.3s;
}

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

/* Hero Section (Inicio) */
#inicio {
    width: 100%;
    height: 100vh;
    position: relative;
    padding: 0;
    overflow: hidden;
}

#inicio::before {
    content: '';
    position: absolute;
    inset: 0; /* shorthand for top, right, bottom, left */
    background: rgba(0, 0, 0, 0.6);
}

/* Services Section */
#servicios {
    background-color: var(--primary-color);
}

#servicios .section-title-wrapper .section-title,
#servicios .section-title-wrapper p {
    color: var(--background-light);
}

#servicios .section-title::after {
    background: var(--background-light);
}

.service-card .icon-circle {
    width: 80px;
    height: 80px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    transition: all 0.3s ease;
}

.service-card:hover .icon-circle {
    background-color: var(--text-dark);
    transform: scale(1.1);
}

.btn-service-card {
    border: 1px solid var(--text-dark);
    color: var(--text-dark);
    background-color: transparent;
    transition: all 0.3s ease;
}

.btn-service-card:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--background-light);
}

/* Service Modal */
.service-modal-content .modal-header {
    background-color: var(--primary-color);
    color: var(--background-light);
}

.service-modal-content .modal-title {
    color: var(--background-light);
}

/* Contacto Section */
#contacto {
    background-color: var(--primary-color);
}

#contacto .section-title-wrapper .section-title,
#contacto .section-title-wrapper p,
#contacto .form-label {
    color: var(--background-light);
}

#contacto .section-title::after {
    background: var(--background-light);
}

/* Override for contact button */
#contacto .btn-secondary {
    background-color: var(--text-dark);
    border-color: var(--text-dark);
    color: var(--background-light);
}

#contacto .btn-secondary:hover {
    background-color: #e9ecef; /* light gray */
    border-color: #e9ecef;
    color: var(--text-dark);
}

/* Experience & Certifications Section */
.cert-logo {
    filter: grayscale(100%);
    transition: all 0.4s ease-in-out;
    opacity: 0.7;
}

.cert-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* Footer */
footer a:hover {
    color: var(--primary-color) !important;
}

/* Hero Carousel */
#heroCarousel .carousel-item {
    width: 100%;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#heroCarousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

#heroCarousel .carousel-caption {
    z-index: 2;
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.carousel-item-zoom {
    animation: zoomOut 8s ease-out forwards;
}

@keyframes zoomOut {
    from {
        transform: scale(1.1);
    }
    to {
        transform: scale(1);
    }
}

/* Loader Styles */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    /* White background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.75s, visibility 0.75s;
}

#loader.hidden {
    opacity: 0;
    visibility: hidden;
}

#loader img {
    width: 250px;
    /* Adjust size as needed */
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(0.95);
    }
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
    #heroCarousel .carousel-caption {
        padding-top: 100px; /* Adjust this value based on your navbar height */
        align-items: flex-start !important;
    }

    #heroCarousel .carousel-caption h1 {
        font-size: 2rem; /* Smaller font size for the main title on mobile */
    }
}
