/* -------------------------------------------------------------------------- */
/*                        HERO TRANSPARENT HEADER SETUP                       */
/* -------------------------------------------------------------------------- */

:root {
    --dr-brand-gold: #C7A047;
    --dr-brand-gold-hover: #B28B3A;
    --dr-brand-black: #000000;
    --dr-brand-smoke: #777777;
}

/* Header Position & Transparency */
body.transparent-header #sp-header:not(.header-sticky),
body.itemid-101 #sp-header:not(.header-sticky) {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: transparent !important;
    box-shadow: none !important;
    z-index: 9999;
}

/* Force transparency on header children */
body.transparent-header #sp-header:not(.header-sticky) .container,
body.transparent-header #sp-header:not(.header-sticky) .container-fluid,
body.transparent-header #sp-header:not(.header-sticky) .row,
body.transparent-header #sp-header:not(.header-sticky) .sp-container,
body.transparent-header #sp-header:not(.header-sticky)>div,
body.itemid-101 #sp-header:not(.header-sticky) .container,
body.itemid-101 #sp-header:not(.header-sticky) .container-fluid,
body.itemid-101 #sp-header:not(.header-sticky) .row,
body.itemid-101 #sp-header:not(.header-sticky) .sp-container,
body.itemid-101 #sp-header:not(.header-sticky)>div {
    background: transparent !important;
    box-shadow: none !important;
}


body.transparent-header:not(.scrolled) #sp-header:not(.header-sticky) .sp-megamenu-parent>li>a,
body.transparent-header:not(.scrolled) #sp-header:not(.header-sticky) .logo a,
body.transparent-header:not(.scrolled) #sp-header:not(.header-sticky) .sp-module a,
body.itemid-101:not(.scrolled) #sp-header:not(.header-sticky) .sp-megamenu-parent>li>a,
body.itemid-101:not(.scrolled) #sp-header:not(.header-sticky) .logo a,
body.itemid-101:not(.scrolled) #sp-header:not(.header-sticky) .sp-module a {
    color: #ffffff !important;
}

/* Usuarios link color on standard pages */
#sp-header .sp-module a {
    color: #000000 !important;
    transition: color 0.3s ease;
}

#sp-header .sp-module a:hover {
    color: var(--dr-brand-gold) !important;
}

/* -------------------------------------------------------------------------- */
/*                        LOGO STRATEGY (Dual Logo)                           */
/* -------------------------------------------------------------------------- */

/* Default / Inner Pages / Sticky: Dark Logo */
.logo-image {
    content: url('/images/logo-drevuelta2.png');
    width: auto;
}

/* Homepage Transparent Header: Light Logo */
body.itemid-101:not(.scrolled) #sp-header:not(.header-sticky) .logo-image,
body.transparent-header:not(.scrolled) #sp-header:not(.header-sticky) .logo-image {
    content: url('/images/logo-drevuelta1.png');
}

/* -------------------------------------------------------------------------- */
/*                        HERO SECTION STYLES                                 */
/* -------------------------------------------------------------------------- */

.hero-section {
    position: relative;
    width: 100%;
    height: 600px;
    background-color: transparent;
    /* Changed to transparent, color handled by overlay */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 0;
    overflow: hidden;
}

/* Remove global filter that turned everything B&W */
#sp-hero,
#sp-section-1,
.hero-section-container {
    filter: none !important;
}

#mod-custom110 {
    background-size: cover;
    background-position: center;
}

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Background image is now handled by the Joomla module */
    background-size: cover;
    background-position: top center;
    filter: grayscale(100%);
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Opacity and color filter */
    background: rgba(0, 0, 0, 0.5);
    /* Adjust this for more/less darkness */
    /* THIS TURNS ONLY WHAT'S BEHIND (THE IMAGE) INTO B&W */
    backdrop-filter: grayscale(100%);
    -webkit-backdrop-filter: grayscale(100%);
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1320px;
    padding: 0 15px;
    margin: 0 auto;
}

.hero-content {
    max-width: 800px;
    text-align: center;
    padding-top: 100px;
}

/* Desktop Hero Adjustments */
@media (min-width: 768px) {
    .hero-section {
        height: 30vh;
        min-height: 525px;
        justify-content: flex-start;
        text-align: left;
    }

    .hero-content {
        text-align: left;
        padding-left: 2rem;
    }

    .hero-buttons {
        justify-content: flex-start;
    }
}

.hero-subtitle {
    color: var(--dr-brand-gold);
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    display: block;
}

.hero-title {
    font-weight: 700;
    font-size: 2.5rem;
    /* Mobile */
    line-height: 1.1;
    color: #fff;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 4.5rem;
        /* Desktop */
    }
}

.text-gradient-gold {
    background: linear-gradient(to right, var(--dr-brand-gold), #fef08a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-description {
    font-size: 1rem;
    color: #d1d5db;
    /* Gray-300 */
    margin-bottom: 2.5rem;
    max-width: 42rem;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .hero-description {
        font-size: 1.25rem;
    }
}

/* Buttons */
.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-direction: column;
}

@media (min-width: 768px) {
    .hero-buttons {
        flex-direction: row;
    }
}

.btn-dr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    font-weight: 600;
    font-size: 1.125rem;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-dr-primary {
    background-color: var(--dr-brand-gold);
    color: #fff;
    border: 2px solid var(--dr-brand-gold);
}

.btn-dr-primary:hover {
    background-color: var(--dr-brand-gold-hover);
    border-color: var(--dr-brand-gold-hover);
    color: #fff;
    transform: translateY(-2px);
}

.btn-dr-outline {
    background-color: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.btn-dr-outline:hover {
    background-color: #fff;
    color: var(--dr-brand-black);
    transform: translateY(-2px);
}

/* Dark / Solid Button Variant (for white backgrounds) */
.mod-servicios-portada .btn-dr-outline,
.btn-dr-outline-dark {
    background-color: var(--dr-brand-black) !important;
    color: #fff !important;
    border: 2px solid var(--dr-brand-black) !important;
    border-radius: 50px !important;
    /* Pill shape */
}

.mod-servicios-portada .btn-dr-outline:hover,
.btn-dr-outline-dark:hover {
    background-color: var(--dr-brand-gold) !important;
    border-color: var(--dr-brand-gold) !important;
    color: #fff !important;
}

/* -------------------------------------------------------------------------- */
/*                        MENU OVERRIDES                                      */
/* -------------------------------------------------------------------------- */


/* Menu Items (Transparent State) */
body.transparent-header:not(.scrolled) #sp-header:not(.header-sticky) .sp-megamenu-parent>li>a,
body.itemid-101:not(.scrolled) #sp-header:not(.header-sticky) .sp-megamenu-parent>li>a {
    color: #ffffff !important;
    font-weight: 500;
}

/* Menu Hover Effect */
.sp-megamenu-parent>li>a {
    position: relative;
    transition: color 0.3s ease;
}

.sp-megamenu-parent>li>a:hover,
.sp-megamenu-parent>li.active>a {
    color: var(--dr-brand-gold) !important;
}

/* -------------------------------------------------------------------------- */
/*                        ANIMATIONS                                          */
/* -------------------------------------------------------------------------- */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    opacity: 0;
    animation: fadeUp 0.8s ease-out forwards;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

/* -------------------------------------------------------------------------- */
/*                        LAYOUT & SERVICES MODULE                            */
/* -------------------------------------------------------------------------- */

/* Specific max-width for services grid sections */
@media (min-width: 992px) {

    .container:has(.mod-servicios-portada),
    .container-lg:has(.mod-servicios-portada),
    .container-md:has(.mod-servicios-portada),
    .container-sm:has(.mod-servicios-portada),
    .container:has(.mod-articles-grid),
    .container-lg:has(.mod-articles-grid),
    .container-md:has(.mod-articles-grid),
    .container-sm:has(.mod-articles-grid) {
        max-width: 1180px;
    }
}

/* Grid Layout Reset & Setup */
.mod-servicios-portada ul,
.mod-articles-grid {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.mod-servicios-portada ul li,
.mod-articles-grid li {
    list-style-type: none !important;
    flex: 0 0 100%;
    /* Mobile 1 col */
}

@media (min-width: 992px) {

    .mod-servicios-portada ul li,
    .mod-articles-grid li {
        flex: 0 0 calc(33.333% - 20px);
        /* Desktop 3 cols */
    }
}

/* Service Items Styling */
.mod-servicios-portada img,
.mod-articles-grid img {
    border-radius: 8px;
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 1.5rem;
    object-fit: cover;
    aspect-ratio: 16/9;
}

.mod-servicios-portada h3,
.mod-articles-grid h3 {
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
}

.mod-servicios-portada p,
.mod-articles-grid p {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.mod-servicios-portada a.readmore,
.mod-servicios-portada a,
.mod-articles-grid a.readmore,
.mod-articles-grid a.btn-link {
    color: #2563eb;
    /* Blue to match PWA screenshot */
    text-decoration: none;
    font-weight: 500;
}

.mod-servicios-portada a:hover,
.mod-articles-grid a:hover {
    color: var(--dr-brand-gold-hover);
    text-decoration: underline;
}

/* -------------------------------------------------------------------------- */
/*                        GRADUATION PROMO SECTION                            */
/* -------------------------------------------------------------------------- */

.grad-promo-section {
    position: relative;
    padding: 80px 0;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-attachment: scroll !important;
    color: #fff;
    overflow: hidden !important;
    border-radius: 20px !important;
}

/* -------------------------------------------------------------------------- */
/*                        CTA PRESUPUESTO MODULE                              */
/* -------------------------------------------------------------------------- */

.mod-cta-presupuesto {
    position: relative;
}

/* Fallback background if inline style is missing */


.grad-promo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Reduced opacity or gradient to ensure image visibility */
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.6));
    z-index: 1;
}

.grad-promo-container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
}

@media (min-width: 992px) {
    .grad-promo-container {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.grad-promo-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .grad-promo-content {
        flex-direction: row;
        align-items: flex-start;
    }
}

.grad-promo-icon {
    width: 48px;
    height: 48px;
    color: var(--dr-brand-gold);
    flex-shrink: 0;
}

.grad-promo-icon svg {
    width: 100%;
    height: 100%;
}

.grad-promo-text h2 {
    color: #fff !important;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.grad-promo-text p {
    color: #d1d5db;
    max-width: 600px;
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.6;
}

.grad-promo-actions .btn-dr {
    min-width: 220px;
}

/* -------------------------------------------------------------------------- */
/*                        FEATURES SECTION (WHY CHOOSE US)                    */
/* -------------------------------------------------------------------------- */

.features-section {
    padding: 80px 0;
    background-color: #f9fafb;
    /* brand-light fallback */
}

.features-header {
    text-align: center;
    margin-bottom: 60px;
}

.features-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dr-brand-black);
    margin-bottom: 1rem;
}

.features-header p {
    color: var(--dr-brand-smoke);
    max-width: 768px;
    margin: 0 auto;
    font-size: 1.125rem;
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-card {
    background: #ffffff;
    padding: 3rem 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.feature-icon {
    color: var(--dr-brand-gold);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.feature-icon svg {
    width: 48px;
    height: 48px;
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dr-brand-black);
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--dr-brand-smoke);
    line-height: 1.6;
    margin: 0;
}

/* -------------------------------------------------------------------------- */
/*                        CONTACT SECTION                                     */
/* -------------------------------------------------------------------------- */

.contact-section {
    padding: 80px 0;
    background-color: #f3f4f6;
}

.contact-container {
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

@media (min-width: 992px) {
    .contact-container {
        flex-direction: row;
    }
}

.contact-info-side {
    background-color: var(--dr-brand-black);
    color: #ffffff;
    padding: 60px;
    flex: 0 0 40%;
    position: relative;
    overflow: hidden;
}

.contact-info-side h2 {
    color: var(--dr-brand-gold) !important;
    font-size: 2.25rem;
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
}

.contact-method {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
}

.contact-method svg {
    width: 28px;
    height: 28px;
    color: var(--dr-brand-gold);
    margin-right: 20px;
    flex-shrink: 0;
}

.contact-method h3 {
    font-size: 1.125rem;
    margin-bottom: 5px;
    color: #fff;
}

.contact-method p {
    color: #d1d5db;
    margin: 0;
}

.contact-form-side {
    padding: 60px;
    flex: 1;
}

.contact-form-side h2 {
    font-size: 2.25rem;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: var(--dr-brand-gold);
    outline: none;
    box-shadow: 0 0 0 3px rgba(199, 160, 71, 0.2);
}

/* -------------------------------------------------------------------------- */
/*                        FOOTER SECTION                                      */
/* -------------------------------------------------------------------------- */

.footer-section {
    background-color: var(--dr-brand-black);
    color: #ffffff;
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

.footer-logo img {
    height: 100px !important;
    margin-bottom: 25px;
    width: auto;
}

/* -------------------------------------------------------------------------- */
/*                        FIX CTA GRADUACION (FONDO Y BORDES)                 */
/* -------------------------------------------------------------------------- */

/* Module container: handles the Joomla background and the rounding */
.mod-cta-presupuesto,
#mod-custom112 {
    border-radius: 20px !important;
    overflow: hidden !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    border: none !important;
    padding: 0 !important;
}

.mod-cta-presupuesto .sp-module-content,
.mod-cta-presupuesto .mod-custom.custom {
    padding: 0 !important;
}

/* Inner section: handles the dark overlay (opacity) */
.graduation-cta {
    background: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)) !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    margin: 0 !important;
    border: 1px solid rgba(199, 160, 71, 0.4) !important;
    min-height: 380px;
    display: flex;
    align-items: center;
}

.footer-about p {
    color: #9ca3af;
    line-height: 1.6;
    max-width: 350px;
}

.footer-links h4 {
    color: #fff;
    font-size: 1.25rem;
    margin-bottom: 25px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--dr-brand-gold);
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s;
}

.footer-social-link:hover {
    background: var(--dr-brand-gold);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
}

/* -------------------------------------------------------------------------- */
/*                        PAGE HEADER TITLES (INNER PAGES)                   */
/* -------------------------------------------------------------------------- */

/* Page Title Section - Joomla Structure */
.sp-page-title {
    text-align: center;
    padding: 60px 0 40px;
    background-color: transparent;
}

.sp-page-title .container {
    text-align: center;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.sp-page-title-heading {
    font-size: 2.5rem;
    font-weight: 700;
    color: #000000 !important;
    margin-bottom: 0.75rem;
    line-height: 1.2;
    text-align: center;
}

.sp-page-title-sub-heading {
    display: block;
    font-size: 1rem;
    font-weight: 400;
    color: #4b5563 !important;
    /* Cambiado a un gris más suave para mejor contraste */
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sp-page-title {
        padding: 40px 0 30px;
    }

    .sp-page-title-heading {
        font-size: 2rem;
    }

    .sp-page-title-sub-heading {
        font-size: 0.9rem;
        padding: 0 15px;
    }
}