/**
 * Home V3 - Premium Layout Styles
 * Elera Renováveis - Site Institucional
 *
 * Design Direction: Clean Energy, Modern Elegance
 * Typography: Lato with refined weights
 * Colors: Deep Purple (#7443A4), Vibrant Orange (#F47920)
 */

/* =====================================================
   CSS CUSTOM PROPERTIES
   ===================================================== */
:root {
    /* Primary Colors */
    --elera-purple: #7443A4;
    --elera-purple-light: #74479C;
    --elera-purple-dark: #3D2683;
    --elera-orange: #F47920;
    --elera-orange-dark: #d96a1a;

    /* Neutral Colors */
    --elera-white: #FFFFFF;
    --elera-cream: #FEF8F4;
    --elera-gray: #5F5469;
    --elera-gray-light: #9A8FA3;

    /* Gradients */
    --gradient-purple: linear-gradient(135deg, #7443A4 0%, #3D2683 100%);
    --gradient-hero: linear-gradient(270deg, rgba(116, 67, 164, 1) 47%, rgba(116, 67, 164, 0) 75%);

    /* Spacing */
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 32px;
    --space-xl: 48px;
    --space-2xl: 80px;
    --space-3xl: 100px;

    /* Typography */
    --font-primary: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Shadows */
    --shadow-soft: 0 4px 20px rgba(116, 67, 164, 0.1);
    --shadow-medium: 0 8px 30px rgba(116, 67, 164, 0.15);
    --shadow-strong: 12px 20px 30px rgba(0, 0, 0, 0.15);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 11px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-round: 180px;
}

/* =====================================================
   BASE & RESET
   ===================================================== */
#home-v3 {
    font-family: var(--font-primary);
    color: var(--elera-gray);
    overflow-x: hidden;
    background: var(--elera-white);
}

#home-v3 *,
#home-v3 *::before,
#home-v3 *::after {
    box-sizing: border-box;
}

/* =====================================================
   ANIMATIONS KEYFRAMES
   ===================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.05;
    }

    50% {
        opacity: 0.08;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* =====================================================
   CONTAINER
   ===================================================== */
.hv3-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

/* =====================================================
   BUTTONS
   ===================================================== */
.hv3-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 28px;
    border-radius: var(--radius-xl);
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 16px;
    line-height: 1;
    text-decoration: none;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-smooth);
}

.hv3-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.hv3-btn:hover::before {
    left: 100%;
}

.hv3-btn--primary {
    background: var(--elera-purple);
    color: var(--elera-white);
    box-shadow: 0 4px 15px rgba(116, 67, 164, 0.3);
}

.hv3-btn--primary:hover {
    background: var(--elera-purple-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(116, 67, 164, 0.4);
    color: var(--elera-white);
    opacity: 1;
}

.hv3-btn--secondary {
    background: var(--elera-orange);
    color: var(--elera-white);
    box-shadow: 0 4px 15px rgba(244, 121, 32, 0.3);
}

.hv3-btn--secondary:hover {
    background: var(--elera-orange-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(244, 121, 32, 0.4);
    color: var(--elera-white);
    opacity: 1;
}

.hv3-btn__icon {
    display: flex;
    align-items: center;
    transition: transform var(--transition-fast);
}

.hv3-btn:hover .hv3-btn__icon {
    transform: translateX(4px);
}

/* =====================================================
   SECTION TITLE
   ===================================================== */
.hv3-title {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: clamp(32px, 5vw, 45px);
    line-height: 1.1;
    color: var(--elera-orange);
    margin: 0 0 var(--space-lg);
}

.hv3-title--purple {
    color: var(--elera-purple);
}

.hv3-title--white {
    color: var(--elera-white);
}

.hv3-text {
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: clamp(18px, 2vw, 20px);
    line-height: 1.65;
    color: var(--elera-gray);
    margin: 0 0 var(--space-lg);
}

.hv3-text--white {
    color: var(--elera-white);
}

.hv3-text--large {
    font-size: clamp(20px, 2.5vw, 24px);
    line-height: 1.4;
}

/* =====================================================
   HERO SECTION
   ===================================================== */
.hv3-hero {
    position: relative;
    width: 100%;
}

.hv3-hero__media {
    height: 650px;
    position: relative;
    flex: 1;
    overflow: hidden;
}

.hv3-hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 8s ease;
}

.hv3-hero:hover .hv3-hero__bg {
    transform: scale(1.02);
}

.hv3-hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(116, 67, 164, 0) 0%, rgba(116, 67, 164, 0.1) 100%);
}

.hv3-hero__video {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    cursor: pointer;
}

.hv3-hero__video-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
    z-index: 2;
}

.hv3-hero__content {
    position: relative;
    background: var(--elera-purple);
    padding: 45px var(--space-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    overflow: hidden;
}

.hv3-hero__decorative {
    position: absolute;
    width: 280px;
    height: 280px;
    opacity: 0.05;
    animation: pulse 4s ease-in-out infinite;
    pointer-events: none;
}

.hv3-hero__decorative--left {
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    background: url('../img/home-v3/hero-decorative-left.svg') center/contain no-repeat;
}

.hv3-hero__decorative--right {
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="white" stroke-width="2"/><circle cx="50" cy="50" r="25" fill="none" stroke="white" stroke-width="1.5"/><circle cx="50" cy="50" r="10" fill="white"/></svg>') center/contain no-repeat;
    animation-delay: 2s;
}

.hv3-hero__title {
    font-family: var(--font-primary);
    font-weight: 300;
    font-size: clamp(32px, 4.5vw, 59px);
    line-height: 1.1;
    text-align: center;
    color: #fff;
    margin: 0;
    max-width: 1280px;
    animation: fadeInUp 1s ease-out;
}

.hv3-hero__title strong {
    color: var(--elera-orange);
    display: block;
    font-weight: 700;
}

@media (max-width: 1024px) {
    .hv3-hero {
        height: auto;
        min-height: 500px;
    }

    .hv3-hero__media {
        min-height: 350px;
    }

    .hv3-hero__content {
        padding: 30px var(--space-xl);
    }

    .hv3-hero__decorative {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 768px) {
    .hv3-hero__media {
        min-height: 280px;
    }

    .hv3-hero__content {
        padding: 25px var(--space-md);
    }

    .hv3-hero__decorative {
        display: none;
    }
}

/* =====================================================
   CONTENT SECTIONS - SHARED STYLES
   ===================================================== */
.hv3-section {
    padding: var(--space-3xl) 0;
    position: relative;
}

.hv3-section--flush {
    padding: 0;
}

/* Section with image + text grid */
.hv3-grid {
    display: flex;
    align-items: center;
    gap: 75px;
}

.hv3-grid--reverse {
    flex-direction: row-reverse;
}

.hv3-grid__content {
    flex: 1;
    max-width: 623px;
}

.hv3-grid__media {
    flex-shrink: 0;
}

/* Animated entry for sections */
.hv3-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hv3-animate.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.hv3-animate--left {
    transform: translateX(-30px);
}

.hv3-animate--left.is-visible {
    transform: translateX(0);
}

.hv3-animate--right {
    transform: translateX(30px);
}

.hv3-animate--right.is-visible {
    transform: translateX(0);
}

@media (max-width: 1400px) {
    .hv3-grid__content {
        padding-right: 30px;
        padding-left: 30px;
    }
}

@media (max-width: 1024px) {
    .hv3-section {
        padding: var(--space-xl) 0;
    }

    .hv3-grid {
        flex-direction: column !important;
        gap: var(--space-xl);
    }

    .hv3-grid__content {
        max-width: 100%;
    }

    .hv3-grid__media img {
        max-width: 90% !important;
    }
}

/* =====================================================
   CUIDAR DO PLANETA
   ===================================================== */
.hv3-cuidar__image {
    position: relative;
}

.hv3-cuidar__image img {
    width: 662px;
    height: 662px;
    object-fit: cover;
    border-radius: var(--radius-round) 0 0 var(--radius-sm);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.hv3-cuidar__image:hover img {
    transform: scale(1.02);
    box-shadow: var(--shadow-strong);
}

@media (max-width: 1200px) {
    .hv3-cuidar__image img {
        width: 480px;
        height: 480px;
    }
}

@media (max-width: 1024px) {
    .hv3-cuidar__image img {
        width: 100%;
        max-width: 500px;
        height: auto;
        aspect-ratio: 1;
    }

    .hv3-cuidar__image::before {
        display: none;
    }
}

/* =====================================================
   RENOVAR - TWO COLUMN TEXT
   ===================================================== */
.hv3-renovar {
    padding: 80px 0 0;
}

.hv3-renovar__grid {
    display: flex;
    gap: 140px;
    align-items: flex-start;
}

.hv3-renovar__title-col {
    flex-shrink: 0;
    width: 320px;
}

.hv3-renovar__title {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: clamp(28px, 3.5vw, 40px);
    line-height: 1.125;
    color: var(--elera-purple);
    margin: 0;
    position: relative;
}

.hv3-renovar__text-col {
    flex: 1;
}

.hv3-renovar__text {
    font-size: clamp(20px, 2.5vw, 24px);
    line-height: 1.4;
    color: var(--elera-gray);
    margin: 0;
}

@media (max-width: 1024px) {
    .hv3-renovar__grid {
        flex-direction: column;
        gap: var(--space-xl);
    }

    .hv3-renovar__title-col {
        width: 100%;
        text-align: center;
    }

    .hv3-renovar__title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .hv3-renovar__text-col {
        text-align: center;
    }
}

/* =====================================================
   NOSSA ENERGIA
   ===================================================== */
.hv3-energia__image {
    position: relative;
}

.hv3-energia__image img {
    width: 662px;
    height: 662px;
    object-fit: cover;
    border-radius: 0 var(--radius-round) 0 var(--radius-sm);
}

@media (max-width: 1200px) {
    .hv3-energia__image img {
        width: 480px;
        height: 480px;
    }
}

@media (max-width: 1024px) {
    .hv3-energia__image img {
        width: 100%;
        max-width: 500px;
        height: auto;
        aspect-ratio: 1;
    }

    .hv3-energia__image::after {
        display: none;
    }
}

/* =====================================================
   COMERCIAL SECTION
   ===================================================== */
.hv3-comercial {
    position: relative;
    padding: 120px var(--space-2xl);
    min-height: 758px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.hv3-comercial::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-hero);
    z-index: 1;
}

.hv3-comercial__content {
    position: relative;
    z-index: 2;
}

.hv3-comercial__title {
    font-family: var(--font-primary);
    font-weight: 300;
    font-size: clamp(32px, 4vw, 45px);
    line-height: 1.1;
    color: var(--elera-white);
    margin: 0 0 30px;
}

.hv3-comercial__title strong {
    font-weight: 700;
}

.hv3-comercial__texts {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hv3-comercial__text {
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: clamp(18px, 2vw, 20px);
    line-height: 1.65;
    color: var(--elera-white);
    margin: 0;
}

.hv3-comercial__text--highlight {
    line-height: 1.3;
    font-weight: 500;
}

.hv3-comercial-btn {
    margin-top: 30px;
}

@media (max-width: 992px) {
    .hv3-comercial {
        background: url(../img/home-v3/bg-comercial-mobile.png) top / cover no-repeat !important;
        padding: 330px var(--space-xl) var(--space-xl);
        min-height: auto;
        justify-content: center;
    }

    .hv3-comercial::before {
        display: none;
    }
}

/* =====================================================
   GOVERNANCA SECTION
   ===================================================== */
.hv3-governanca {
    background: var(--elera-cream);
    padding: var(--space-3xl) 0 309px;
}

.hv3-governanca__image {
    position: relative;
}

.hv3-governanca__image img {
    width: 625px;
    height: 500px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-strong);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.hv3-governanca__image:hover img {
    transform: translateY(-5px);
    box-shadow: 16px 24px 40px rgba(0, 0, 0, 0.2);
}

@media (max-width: 1200px) {
    .hv3-governanca__image img {
        width: 480px;
        height: 384px;
    }
}

@media (max-width: 1024px) {
    .hv3-governanca__image img {
        width: 100%;
        max-width: 550px;
        height: auto;
        aspect-ratio: 5/4;
    }
}

/* =====================================================
   NOTICIAS SECTION
   ===================================================== */
.hv3-noticias {
    margin-top: -280px;
    padding: var(--space-3xl) 0;
}

.hv3-noticias__wrapper {
    position: relative;
    background: var(--elera-purple);
    border-radius: var(--radius-lg);
    padding: 60px 108px;
    min-height: 336px;
    display: flex;
    align-items: center;
    overflow: hidden;
    transition: box-shadow var(--transition-smooth);
}

.hv3-noticias__wrapper:hover {
    box-shadow: 0 20px 60px rgba(116, 67, 164, 0.3);
}

.hv3-noticias__wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hv3-noticias__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 550px;
}

.hv3-noticias__title {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: clamp(32px, 4vw, 45px);
    line-height: 1.1;
    color: var(--elera-orange);
    margin: 0;
}

.hv3-noticias__text {
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: clamp(18px, 2vw, 20px);
    line-height: 1.65;
    color: var(--elera-white);
    margin: 0;
}

.hv3-noticias__image {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.hv3-noticias__image img {
    height: 100%;
    width: auto;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.hv3-noticias__wrapper:hover .hv3-noticias__image img {
    transform: scale(1.5) translateX(78px);
    max-width: none !important;
}

.hv3-noticias__btn {
    width: 281px;
}

@media screen and (max-width: 1300px) {
    .hv3-noticias .hv3-container {
        margin: 0 auto;
        max-width: 90%;
    }
}

@media (max-width: 1200px) {
    .hv3-noticias__wrapper {
        padding: 50px 60px;
    }

    .hv3-noticias__image {
        opacity: 0.4;
    }
}

@media (max-width: 1024px) {
    .hv3-noticias__wrapper {
        padding: 40px 30px;
        flex-direction: column;
        text-align: center;
        justify-content: center;
    }

    .hv3-noticias__content {
        max-width: 100%;
        align-items: center;
    }

    .hv3-noticias {
        padding-bottom: 0;
    }

    .hv3-noticias__image {
        margin-top: 30px;
        opacity: 1;
        position: relative;
    }

    .hv3-noticias__image img {
        transform: none;
    }
}

/* =====================================================
   DARK MODE SUPPORT
   ===================================================== */
.darckTheme .hv3-title {
    color: #ff9800;
}

.darckTheme .hv3-title--purple {
    color: #b794d4;
}

.darckTheme .hv3-text {
    color: #e0e0e0;
}

.darckTheme .hv3-renovar__title {
    color: #b794d4;
}

.darckTheme .hv3-renovar__text {
    color: #e0e0e0;
}

.darckTheme .hv3-governanca {
    background: #1a1a1a;
}

.darckTheme .hv3-hero__title {
    color: #b794d4;
}

/* =====================================================
   SCROLL ANIMATIONS
   ===================================================== */
.hv3-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hv3-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.hv3-reveal--delay-1 {
    transition-delay: 0.1s;
}

.hv3-reveal--delay-2 {
    transition-delay: 0.2s;
}

.hv3-reveal--delay-3 {
    transition-delay: 0.3s;
}

/* =====================================================
   ACCESSIBILITY
   ===================================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hv3-reveal {
        opacity: 1;
        transform: none;
    }
}

/* Focus styles for accessibility */
.hv3-btn:focus-visible {
    outline: 3px solid var(--elera-orange);
    outline-offset: 3px;
}

/* =====================================================
   PRINT STYLES
   ===================================================== */
@media print {

    .hv3-hero__decorative,
    .hv3-btn__icon {
        display: none;
    }

    .hv3-section {
        padding: 30px 0;
    }
}