/*==================================================================
  Global Imports
 ==================================================================*/
@import url("https://fonts.googleapis.com/css2?family=Inclusive+Sans:wght@300;400;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap");

/*==================================================================
  CSS Custom Properties
 ==================================================================*/
:root {
    /* brand */
    --clr-accent: #ff6347;
    --clr-accent-hover: #ff4500;

    /* greys */
    --clr-dark: #000;
    --clr-light: #fff;
    --clr-text: #333;
    --clr-text-muted: #555;
    --clr-bg-section: #f4f4f4;

    /* sizing */
    --max-width: 1200px;
    --radius: 10px;
    --transition: 0.3s ease;
}

/*==================================================================
  Global Reset & Base Styles
 ==================================================================*/
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inclusive Sans", sans-serif;
    color: var(--clr-text);
    background: var(--clr-light);
    line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Montserrat", sans-serif;
    line-height: 1.2;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

video {
    display: block;
    max-height: 85vh;
}

/*==================================================================
  Layout: Containers & Utility Classes
 ==================================================================*/
.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: 1.25rem;
}

.text-center {
    text-align: center;
}

/*==================================================================
  Hero Section
 ==================================================================*/
.hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    height: 100vh;
    padding-bottom: 12.5vh;
    background: url("images/heroimage.webp") right / cover no-repeat;
    color: var(--clr-light);
}

.hero-content {
    position: relative;
    max-width: 60%;
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem;
    border-radius: var(--radius);
}

.hero-title {
    font-size: 3rem;
    margin-bottom: .5rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

/* CTA Buttons */
.cta-button {
    display: inline-block;
    background: var(--clr-accent);
    color: var(--clr-light);
    padding: .6rem 1.25rem;
    border-radius: var(--radius);
    font-size: 1.1rem;
    text-decoration: none;
    transition: background var(--transition), transform var(--transition);
}

.cta-button:hover {
    background: var(--clr-accent-hover);
    transform: scale(1.05);
}

.hero-buttons {
    display: flex;
    gap: 1.25rem;
}

/* certificates */
.hero-certificates {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-top: .5rem;
    justify-content: flex-end;
}

.hero-certificates img {
    max-width: 9.375rem;
}

/*==================================================================
  About Section
 ==================================================================*/
.about-me {
    background: var(--clr-bg-section);
    padding-block: 3.125rem;
}

.about-text {
    flex: 1;
    margin-right: 1.25rem;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.about-text p {
    font-size: 1.2rem;
    color: var(--clr-text-muted);
    margin-bottom: .9rem;
}

.about-image {
    flex: 1;
}

.about-image img {
    border-radius: var(--radius);
    box-shadow: 0 4px 10px rgba(0, 0, 0, .1);
    max-height: 85vh;
    object-fit: cover;
}

/*==================================================================
  Video Locals / Embed
 ==================================================================*/
.video-local-container {
    max-height: 85vh;
}

.video-embed-container {
    max-height: 85vh;
    position: relative;
    aspect-ratio: 16 / 9;
    max-width: 1280px;
    margin-inline: auto;
}

.video-embed-container iframe,
.video-local-container video {
    width: 100%;
    height: 100%;
    border-radius: var(--radius);
    box-shadow: 0 4px 10px rgba(0, 0, 0, .1);
}

/*==================================================================
  Portfolio and Content Sections
 ==================================================================*/
.portfolio-section,
.marcas-section,
.motion-graphics-section,
.promocionales-section {
    text-align: center;
    padding-block: 2.5rem;
}

.portfolio-section {
    background: var(--clr-bg-section);
}

.portfolio-section .container {
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.portfolio-section h1 {
    font-size: 2.5rem;
}

.video-item {
    text-align: center;
    margin-bottom: 3rem;
}

.video-item h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.video-item h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

/*==================================================================
  Slider (Marcas)
 ==================================================================*/
.slider {
    --width: 6.25rem;
    /* default desktop values */
    --height: 3.125rem;
    --quantity: 21;
    width: 100%;
    height: var(--height);
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, #000 10% 90%, transparent);
    margin-block: 2.5rem;
}

.slider .list {
    display: flex;
    min-width: calc(var(--width) * var(--quantity));
    position: relative;
}

.slider .item {
    position: absolute;
    width: var(--width);
    height: var(--height);
    left: 100%;
    animation: autoRun 15s linear infinite;
    animation-delay: calc(((15s / var(--quantity)) * (var(--position) - 1)) - 15s);
    transition: filter .5s;
}

.slider .item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.slider:hover .item {
    animation-play-state: paused !important;
    filter: grayscale(1);
}

.slider .item:hover {
    filter: grayscale(0);
}

@keyframes autoRun {
    from {
        left: 100%;
    }

    to {
        left: calc(var(--width) * -1);
    }
}

.marcas-section h3 {
    font-size: 2rem;
    margin-bottom: 1.25rem;
}

/*==================================================================
  Social Media & Vertical Videos
 ==================================================================*/
.social-media-section {
    background: var(--clr-dark);
    color: var(--clr-light);
}

.social-media-videos,
.vertical-videos {
    display: flex;
    gap: 1.25rem;
    justify-content: space-around;
}

.social-media-videos video {
    width: 30%;
    max-height: 85vh;
    border-radius: var(--radius);
}

.vertical-videos video {
    width: 45%;
    max-height: 85vh;
    border-radius: var(--radius);
}

/*==================================================================
  Footer
 ==================================================================*/
/* Your variables are assumed to be defined in :root */

footer {
    /* --- Background Image Setup --- */
    /* Use the image as a background */
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('images/footerimg.webp');
    /* Fallback color if image fails to load */
    background-color: var(--clr-bg-section, #222);
    background-size: cover;
    background-position: center;

    /* We assume the background is dark, so text should be light */
    color: #fff;

    padding: 3rem 1.5rem 1.5rem;
    /* More padding */
    text-align: center;
}

.footer-main {
    display: flex;
    flex-wrap: wrap;
    /* Allows sections to wrap on smaller screens */
    justify-content: center;
    /* Center the sections */
    gap: 3rem;
    /* Space between contact and social sections */
    margin-bottom: 2.5rem;
}

.footer-contact,
.footer-social {
    flex-basis: 300px;
    /* Each section will have a base width */
    flex-grow: 1;
    /* They can grow to fill space */
    text-align: left;
    /* Align text left within each column */
}

/* Headings for each footer section */
.footer-contact h4,
.footer-social h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    /* Allows underline to fit content */
}

/* Simple underline effect for headings */
.footer-contact h4::after,
.footer-social h4::after {
    content: '';
    display: block;
    width: 50%;
    height: 2px;
    background: var(--clr-accent, #00bfff);
    /* Use your accent color */
    margin-top: 0.25rem;
}

/* Styling for the contact links */
.footer-contact a {
    display: flex;
    /* Aligns icon and text */
    align-items: center;
    gap: 0.75rem;
    /* Space between icon and text */
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    transition: opacity 0.3s ease;
}

.footer-contact a:hover {
    opacity: 0.8;
    /* Simple hover effect */
}

/* Styling for the social media icons */
.social-links {
    display: flex;
    gap: 1.5rem;
    /* Space between icons */
}

.social-links a {
    color: #fff;
    font-size: 1.75rem;
    /* Make icons larger */
    text-decoration: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.social-links a:hover {
    opacity: 0.8;
    transform: scale(1.1);
    /* Slight zoom on hover */
}

/* The bottom copyright bar */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    /* Faint separator line */
    padding-top: 1.5rem;
    margin-top: 2rem;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    /* Subdued text color */
}

/* --- Responsive Design for Mobile --- */
@media (max-width: 768px) {
    .footer-main {
        flex-direction: column;
        /* Stack sections vertically */
        align-items: center;
        /* Center-align the sections */
        gap: 2rem;
    }

    .footer-contact,
    .footer-social {
        text-align: center;
        /* Center-align text on mobile */
        flex-basis: auto;
        /* Reset basis */
        width: 100%;
    }

    .footer-contact h4::after,
    .footer-social h4::after {
        margin-left: auto;
        /* Center the underline */
        margin-right: auto;
    }

    .footer-contact a {
        justify-content: center;
        /* Center the contact links */
    }

    .social-links {
        justify-content: center;
        /* Center the social icons */
    }
}

/*==================================================================
  Responsive Breakpoints
 ==================================================================*/
/*  ≤768px -------------------------------------------------------- */
@media (max-width: 768px) {

    /* hero */
    .hero {
        height: auto;
        align-items: center;
        justify-content: center;
        padding: 20vh 5vw 12vh;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-title {
        font-size: clamp(1.6rem, 6vw, 2.4rem);
    }

    .hero-subtitle {
        font-size: clamp(1rem, 4.5vw, 1.3rem);
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: .75rem;
    }

    .cta-button {
        width: 100%;
    }

    .hero-certificates {
        justify-content: center;
        gap: .625rem;
    }

    .hero-certificates img {
        max-width: 5.625rem;
    }

    /* about */
    .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .about-text {
        margin-right: 0;
        margin-bottom: 1.5rem;
        text-align: center;
    }

    .about-image img {
        max-height: 60vh;
    }

    /* videos layout */
    .social-media-videos,
    .vertical-videos {
        flex-direction: column;
        align-items: center;
    }

    .social-media-videos video,
    .vertical-videos video {
        width: 100%;
        max-width: 600px;
    }

    /* embeds */
    .video-embed-container {
        max-width: 100%;
    }

    /* footer */
    footer {
        flex-direction: column;
        text-align: center;
    }

    .contact-info {
        width: 100%;
    }

    /* slider */
    .slider {
        --width: 4.5rem;
        --height: 2.25rem;
    }
}

/*  ≤480px -------------------------------------------------------- */
@media (max-width: 480px) {
    .cta-button {
        font-size: 1rem;
        padding: .9rem 1.4rem;
    }

    h1,
    h2,
    h3 {
        word-break: break-word;
    }
}

/*==================================================================
  Reduced Data / Fallback
 ==================================================================*/
@media (prefers-reduced-data: reduce) {

    /* hide heavy media if needed */
    video[autoplay] {
        display: none;
    }
}