@import url('https://fonts.googleapis.com/css2?family=Karla:ital,wght@0,200..800;1,200..800&family=Quicksand:wght@300..700&family=Work+Sans:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --quicksand-font: "Quicksand", sans-serif; /* Fuente para titulos */
    --karla-font: "Karla", sans-serif; /* Fuente para subtitulos */
    --worksans-font: "Work Sans", sans-serif; /* Fuente para parrafos */
    --red: #E02828;
    --gray: #A8A09A;
    --dark-gray: #6F6A66;
    --sand: #F5EFEA;
}

* {
    box-sizing: border-box;
    margin: 0;
    font-family: var(--worksans-font);
}

/* CSS smooth scroll fallback (native), JS handles header offset */
html {
    scroll-behavior: smooth;
}

/* TYPOGRAPHY: Fonts mapping
   - Titles (headings, main titles): Quicksand
   - Subtitles / small details / labels: Karla
   - Body / paragraph text: Work Sans (already set globally)
*/

/* Titles */
h1, h2, h3, h4, h5, h6,
.hero__title,
.aboutme__title,
.reviews__title,
.contact__title,
.footer__title {
    font-family: var(--quicksand-font);
}

/* Subtitles / details */
.footer__subtitle,
.aboutme__statistic-label,
.footer__credit,
.aboutme__link,
.contact__description {
    font-family: var(--karla-font);
}

/* Ensure form elements and small labels use Work Sans for readability */
input, textarea, select, button, label {
    font-family: var(--worksans-font);
}

/* HEADER */

.header {
    position: sticky;
    top: 0;
    background-color: #fff;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    z-index: 50;
}

.header__container {
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
    padding: 1rem;
}

.header__content {
    display: flex;
    justify-content: space-between;
}

.header__brand {
    width: 8rem;
}

.header__brand-img {
    width: 100%;
    object-fit: cover;
}

.header__nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header__nav-item {
    text-decoration: none;
    color: var(--dark-gray);
}

.header__nav-item:hover {
    color: var(--red);
}

.header__menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 0.35rem;
    padding: 0;
}

.header__menu-toggle-line {
    width: 25px;
    height: 3px;
    background-color: var(--dark-gray);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.header__menu-toggle.active .header__menu-toggle-line:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.header__menu-toggle.active .header__menu-toggle-line:nth-child(2) {
    opacity: 0;
}

.header__menu-toggle.active .header__menu-toggle-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* HERO */

.hero_section {
    position: relative;
    overflow: hidden;
}

.hero_section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url(../img/hero.webp);
  background-size: cover;
  background-position: center;
  filter: blur(1px) sepia(0.5) saturate(0.8) brightness(0.5) hue-rotate(-10deg);
  z-index: -50;
}

.hero__container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    padding: 8rem 5rem;
    gap: 2rem;
}

.hero__title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    padding: 2rem;
    border-radius: 0.5rem;
    line-height: 1.6;
}

.hero__button {
    text-decoration: none;
    border-radius: 0.5rem;
    border: none;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    background-color: var(--red);
    cursor: pointer;
    padding: 1rem 2rem;
    transition: background-color 0.3s ease;
}

.hero__button:hover {
    background-color: #c71f1f;
}

/* Material Design ripple base */
.md-btn {
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    display: inline-block;
}

.md-btn .md-ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    opacity: 0.8;
    pointer-events: none;
}

.md-btn[data-ripple="light"] .md-ripple {
    background: rgba(255,255,255,0.75);
}

.md-btn[data-ripple="dark"] .md-ripple {
    background: rgba(34,34,34,0.08);
}

@keyframes md-ripple {
    to { transform: scale(4); opacity: 0 }
}

/* reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    .md-btn .md-ripple { display: none }
}

/* SOBRE MI */

.aboutme__section {
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
    background-color: #fff
}

.aboutme__container {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    align-items: center;
    padding: 4rem 2rem;
}

.aboutme__content {
    width: 60%;
}

.aboutme__title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 1rem;
}

.aboutme__presentation {
    display: flex;
    flex-direction: column;
    padding-bottom: 2rem;
    gap: 2rem;
}

.aboutme__text {
    color: var(--dark-gray);
    line-height: 1.6;
}

.aboutme__link {
    color: var(--red);
    text-decoration: none;
    font-weight: 600;
}

.aboutme__statics {
    display: flex;
    gap: 3rem;
    justify-content: left;
}

.aboutme__statistic {
    display: flex;
    flex-direction: column;
    text-align: left;
    padding-left: 1rem;
    border-left: 5px solid var(--red);
}

.aboutme__statistic-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--red);
}

.aboutme__statistic-label {
    color: var(--dark-gray);
    font-size: 0.9rem;
}

.aboutme__image-wrapper {
    display: flex;
    justify-content: center;
    background-color: var(--sand);
    padding: 2rem;
    border-radius: 0.5rem;
}

.aboutme__image {
    width: 100%;
    max-width: 300px;
    border-radius: 0.5rem;
    object-fit: cover;
}

.aboutme__social-links {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.aboutme__social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--red);
    background-color: #fff;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--red);
    border-radius: 0.6rem;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: transform 260ms cubic-bezier(.2,.8,.2,1), box-shadow 260ms ease, background 260ms ease, color 260ms ease;
    will-change: transform, box-shadow;
    position: relative;
    overflow: hidden;
}

.aboutme__social-link-icon {
    width: 20px;
    height: 20px;
    fill: var(--red);
    transition: transform 260ms cubic-bezier(.2,.8,.2,1), fill 260ms ease;
}

.aboutme__social-link:hover,
.aboutme__social-link:focus-visible {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 12px 30px rgba(16,16,16,0.08);
    background: linear-gradient(135deg, rgba(224,40,40,0.06), rgba(224,40,40,0.02));
    color: var(--red);
}

.aboutme__social-link:hover .aboutme__social-link-icon,
.aboutme__social-link:focus-visible .aboutme__social-link-icon {
    transform: translateY(-2px);
    fill: var(--red);
}

/* Keyboard focus for accessibility */
.aboutme__social-link:focus-visible {
    outline: 3px solid rgba(224,40,40,0.12);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .aboutme__social-link,
    .aboutme__social-link-icon {
        transition: none !important;
        transform: none !important;
        box-shadow: none !important;
    }
}

/* RESEÑAS */

.reviews__section {
    background-color: var(--sand);
}

.reviews__container {
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
    padding: 4rem 2rem;
}

.reviews__title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 3rem;
    text-align: center;
}

.reviews__carousel {
    position: relative;
    overflow: visible;
    padding: 2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.reviews__carousel-inner {
    overflow: hidden;
    flex: 1;
}

.reviews__carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    gap: 1.5rem;
    align-items: stretch;
    flex: 1;
}

.review__card {
    flex: 0 0 auto;
    width: 300px;
    max-width: 300px;
    background-color: #fff;
    padding: 1.25rem;
    border-radius: 0.75rem;
    box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    color: var(--dark-gray);
    min-height: 200px;
}

.review__card-stars {
    display: flex;
    gap: 0.5rem;
}

.review__card-star {
    width: 15px;
    height: 15px;
    color: var(--red);
}

.review__card-text {
    flex: 1;
    font-size: 1rem;
    line-height: 1.6;
    font-style: italic;
}

.review__card-author {
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    color: var(--red);
}

.reviews__controls {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

/* Style prev/next placed as direct children of .reviews__carousel */
.reviews__carousel > #prevBtn,
.reviews__carousel > #nextBtn {
    position: relative;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.94);
    border: 1px solid rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    cursor: pointer;
    z-index: 20;
    transition: transform 0.18s ease, background 0.18s ease;
    font-size: 1.1rem;
    color: var(--dark-gray);
}

.reviews__carousel > #prevBtn { order: -1; }
.reviews__carousel > #nextBtn { order: 3; }

.reviews__carousel > #prevBtn:hover,
.reviews__carousel > #nextBtn:hover {
    transform: scale(1.04);
    background: rgba(255,255,255,0.99);
}

.reviews__dots {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
}

.review__dot {
    width: 10px;
    height: 10px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background-color: var(--gray);
    cursor: pointer;
    transition: all 0.22s ease;
    border: none;
    min-width: 8px;
    min-height: 8px;
}

.review__dot.active {
    background-color: var(--red);
    width: 12px;
    height: 12px;
}

/* CONTACTO */

.contact__section {
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
    padding: 4rem 2rem;
}

.contact__container {
    width: 100%;
}

.contact__content {
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;
    gap: 3rem;
}

.contact__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact__title {
    font-family: var(--quicksand-font);
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-gray);
    line-height: 1.4;
}

.contact__description {
    font-family: var(--worksans-font);
    font-size: 1rem;
    color: var(--gray);
    line-height: 1.6;
}

.contact__calendar {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
}

/* Calendly widget sizing: responsive height */
.contact__calendar .calendly-inline-widget {
    width: 100%;
    height: min(70vh, 700px);
    min-height: 420px;
    max-height: 900px;
    border: none;
}

/* RESPONSIVE */

@media (max-width: 1024px) {
    .header__container {
        max-width: 90%;
    }

    .hero__container {
        padding: 6rem 3rem;
    }

    .hero__title {
        font-size: 1.75rem;
        padding: 1.5rem;
    }

    .aboutme__section {
        max-width: 90%;
    }

    .aboutme__container {
        padding: 3rem 1.5rem;
    }

    .aboutme__content {
        width: 100%;
    }

    .aboutme__statics {
        gap: 2rem;
    }

    .aboutme__social-link {
        flex-grow: 1;
    }

    .reviews__carousel {
        gap: 1rem;
    }

    .review__card {
        width: 280px;
        max-width: 280px;
    }

    .reviews__carousel > #prevBtn,
    .reviews__carousel > #nextBtn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .header__container {
        max-width: 95%;
        padding: 0.75rem;
    }

    .header__content {
        flex-direction: row;
        gap: 1rem;
        justify-content: space-between;
        align-items: center;
    }

    .header__brand {
        width: 6rem;
    }

    .header__nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background-color: #fff;
        padding: 1rem;
        gap: 0;
        box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
        width: 100%;
    }

    .header__nav.active {
        display: flex;
    }

    .header__nav-item {
        padding: 0.75rem 1rem;
        display: block;
        border-bottom: 1px solid #f0f0f0;
    }

    .header__nav-item:last-child {
        border-bottom: none;
    }

    .header__menu-toggle {
        display: flex;
        order: 3;
    }

    /* Removed legacy .hero rules (page uses .hero_section) */

    .hero__container {
        padding: 4rem 1.5rem;
        gap: 1.5rem;
    }

    .hero__title {
        font-size: 1.5rem;
        padding: 1rem;
        text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    }

    .hero__button {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .aboutme__section {
        max-width: 95%;
    }

    .aboutme__container {
        flex-direction: column;
        padding: 2rem 1rem;
        gap: 2rem;
    }

    .aboutme__content {
        width: 100%;
    }

    .aboutme__title {
        font-size: 1.75rem;
    }

    .aboutme__statics {
        flex-direction: column;
        gap: 1.5rem;
        justify-content: center;
    }

    .aboutme__image-wrapper {
        width: 100%;
        padding: 1.5rem;
    }

    .aboutme__image {
        max-width: 250px;
    }

    .reviews__carousel {
        gap: 0.5rem;
        padding: 1.5rem 0;
    }

    .reviews__carousel-inner {
        flex: 1;
    }

    .review__card {
        width: 260px;
        max-width: 260px;
        padding: 1rem;
        min-height: 180px;
    }

    .review__card-text {
        font-size: 0.9rem;
    }

    .reviews__carousel > #prevBtn,
    .reviews__carousel > #nextBtn {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }

    .reviews__dots {
        gap: 0.5rem;
        margin-top: 0.75rem;
    }

    .review__dot {
        width: 8px;
        height: 8px;
        aspect-ratio: 1 / 1;
        min-width: 8px;
        min-height: 8px;
    }

    /* CONTACTO RESPONSIVE */
    .contact__section {
        max-width: 95%;
        padding: 3rem 1rem;
    }

    .contact__content {
        flex-direction: column;
        gap: 2rem;
    }

    .contact__info {
        gap: 1rem;
    }

    .contact__title {
        font-size: 1.5rem;
    }

    .contact__description {
        font-size: 0.95rem;
    }

    .contact__calendar {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header__container {
        max-width: 100%;
        padding: 0.5rem;
    }

    .header__nav {
        gap: 0.75rem;
    }

    .header__nav-item {
        font-size: 0.8rem;
    }

    .hero__container {
        padding: 3rem 1rem;
        gap: 1rem;
    }

    .hero__title {
        font-size: 1.25rem;
        padding: 0.75rem;
        line-height: 1.4;
    }

    .hero__button {
        padding: 0.65rem 1.25rem;
        font-size: 0.85rem;
        width: 100%;
        max-width: 200px;
    }

    .aboutme__section {
        max-width: 100%;
    }

    .aboutme__container {
        padding: 1.5rem 1rem;
        gap: 1.5rem;
    }

    .aboutme__title {
        font-size: 1.5rem;
    }

    .aboutme__presentation {
        padding-bottom: 1rem;
        gap: 1rem;
    }

    .aboutme__text {
        font-size: 0.95rem;
    }

    .aboutme__statics {
        gap: 1rem;
    }

    .aboutme__statistic {
        padding-left: 0.75rem;
        border-left: 3px solid var(--red);
    }

    .aboutme__statistic-value {
        font-size: 1.5rem;
    }

    .aboutme__statistic-label {
        font-size: 0.8rem;
    }

    .aboutme__image-wrapper {
        padding: 1rem;
    }

    .aboutme__image {
        max-width: 200px;
    }

    .reviews__container {
        max-width: 95%;
        padding: 2rem 1rem;
    }

    .reviews__title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

    .reviews__carousel {
        gap: 0.5rem;
        padding: 1rem 0;
    }

    .reviews__carousel-inner {
        min-width: 0;
    }

    .review__card {
        width: 100%;
        max-width: 100%;
        padding: 1rem;
        min-height: 160px;
    }

    .review__card-stars {
        gap: 0.3rem;
    }

    .review__card-star {
        width: 12px;
        height: 12px;
    }

    .review__card-text {
        font-size: 0.85rem;
    }

    .review__card-author {
        font-size: 0.85rem;
    }

    .reviews__carousel > #prevBtn,
    .reviews__carousel > #nextBtn {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .reviews__dots {
        gap: 0.4rem;
        margin-top: 0.5rem;
    }

    .review__dot {
        width: 8px;
        height: 8px;
        aspect-ratio: 1 / 1;
        min-width: 8px;
        min-height: 8px;
    }

    .review__dot.active {
        width: 10px;
        height: 10px;
    }

    /* CONTACTO RESPONSIVE - MOBILE */
    .contact__section {
        max-width: 100%;
        padding: 2rem 1rem;
    }

    .contact__title {
        font-size: 1.25rem;
    }

    .contact__description {
        font-size: 0.9rem;
    }
}

/* FOOTER - Modern white design, fully responsive, animated */

.footer {
    background-color: #ffffff;
    color: var(--dark-gray);
    padding: 3.5rem 1.25rem 1.5rem;
    margin-top: 1.5rem;
    box-shadow: 0 -6px 18px rgba(34,34,34,0.03);
}

.footer__container {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

.footer__content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2rem;
}

.footer__section {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    opacity: 0;
    transform: translateY(12px);
    animation: fadeUp .6s ease forwards;
}

.footer__section:nth-child(1){ animation-delay: 0.05s }
.footer__section:nth-child(2){ animation-delay: 0.12s }
.footer__section:nth-child(3){ animation-delay: 0.18s }

.footer__title {
    font-family: var(--quicksand-font);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-gray);
}

.footer__subtitle {
    font-family: var(--karla-font);
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark-gray);
}

.footer__text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--dark-gray);
}

.footer__links { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.5rem }

.footer__link { color: var(--dark-gray); text-decoration: none; font-size: 0.95rem; position: relative; display: inline-block }
.footer__link::after { content: ''; position: absolute; left: 0; bottom: -4px; height: 2px; width: 0; background: var(--red); transition: width .25s ease }
.footer__link:hover::after{ width: 100% }

.footer__contact { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.5rem }
.footer__contact-item { display:flex; gap: 0.6rem; align-items:center; color: var(--dark-gray); font-size: 0.95rem }

.footer__social-links{ display:flex; gap:0.6rem; margin-top:0.5rem }
.footer__social-link{ display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; border-radius:8px; background:var(--sand); color:var(--dark-gray); transition:transform .18s ease, background .18s ease }
.footer__social-link:hover{ transform: translateY(-4px); background: rgba(224,40,40,0.1); color:var(--red) }
.footer__social-link svg{ width:18px; height:18px }

.footer__bottom{ display:flex; justify-content:space-between; gap:1rem; align-items:center; padding-top:1.25rem; border-top:1px solid rgba(34,34,34,0.06) }
.footer__bottom-left{ display:flex; flex-direction:column; gap:0.25rem }
.footer__bottom-right{ display:flex; gap:0.75rem; align-items:center }
.footer__bottom-contacts{ display:flex; gap:0.6rem; align-items:center; flex-wrap:wrap }
.footer__bottom-social{ color:var(--dark-gray); text-decoration:none; font-size:0.95rem; padding:0.35rem 0.6rem; border-radius:6px; background:var(--sand); transition:background .18s, transform .18s }
.footer__bottom-social:hover{ background: rgba(224,40,40,0.06); transform:translateY(-3px) }
.footer__bottom-contact{ color:var(--dark-gray); text-decoration:none; font-size:0.95rem; opacity:0.95 }

.footer__copyright{ font-size:0.85rem; color: rgba(34,34,34,0.7) }
.footer__credit{ font-size:0.85rem; color: rgba(34,34,34,0.6) }
.footer__heart{ color:var(--red); margin:0 0.25rem }

/* Animations */
@keyframes fadeUp{ from{ opacity:0; transform:translateY(12px) } to{ opacity:1; transform:translateY(0) } }

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
    .footer__section, .footer__social-link, .footer__bottom-social{ animation:none; transition:none; transform:none }
}

/* Responsive adjustments */
@media (max-width: 1024px){
    .footer__content{ grid-template-columns: 1fr 1fr; }
    .footer__bottom{ flex-direction:column; align-items:center; text-align:center }
    .footer__bottom-right{ justify-content:center }
}

@media (max-width: 768px){
    .footer{ padding:2.5rem 0.75rem 1rem }
    .footer__content{ grid-template-columns: 1fr; gap:1.25rem }
    .footer__bottom{ padding-top:1rem }
    .footer__title{ font-size:1.05rem }
}

@media (max-width: 480px){
    .footer{ padding:2rem 0.75rem 0.75rem }
    .footer__bottom-right{ gap:0.5rem }
    .footer__bottom-social{ padding:0.3rem 0.5rem; font-size:0.9rem }
}