:root {
    --tigres-yellow: #FFBB00;
    --tigres-blue: #0033CC;
    --tigres-text: #231F20;
    --tigres-text-faint: #BCBECC;
}

html {
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--tigres-text);
    background-color: #fff;
}

.main-wrapper {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

.main-wrapper.loaded {
    opacity: 1;
}

/* Landing 1 Styles */
.header-landing {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 50px;
    flex-shrink: 0;
}

.logo-img {
    height: 90px;
    max-width: 100%;
    object-fit: contain;
}

.link-tigres {
    text-decoration: none;
    color: var(--tigres-text);
    font-weight: 500;
}

.hero-section {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
    position: relative;
}

/* Desktop: hero-content is absolutely centered in the hero section */
.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 30px;
    width: 100%;
}

.socio-tigre-highlight {
    background: linear-gradient(180deg, transparent 27%, var(--tigres-blue) 25%);
    color: inherit;
    padding: 0 5px;
    display: inline-block;
}


.hero-subtitle {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: -7px;
}

.hero-desc {
    font-size: 1.3rem;
    color: var(--tigres-text);
    margin-bottom: 20px;
    font-weight: 500;
}

.btn-unirme {
    background-color: var(--tigres-yellow);
    color: var(--tigres-text);
    border: none;
    padding: 15px 40px;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s;
}

.btn-unirme:hover {
    transform: scale(1.05);
    color: var(--tigres-text);
}

/* How It Works Grid - Desktop */
.how-it-works-grid {
    margin: 0 auto 30px auto;
    width: 90%;
    max-width: 1100px;
    border: 1px solid #eee;
    border-radius: 15px;
    padding: 15px 30px;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 0px 0px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    flex-shrink: 0;
}

/* Bootstrap d-md-grid override (Bootstrap doesn't have d-md-grid) */
@media (min-width: 768px) {
    .d-md-grid {
        display: grid !important;
    }
}

.grid-cell {
    display: flex;
}

.number-cell {
    justify-content: flex-end;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--tigres-yellow);
    align-items: flex-end;
    line-height: 1;
    padding-right: 20px;
    border-left: 1px solid #eee;
}

.number-cell span {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: var(--tigres-blue);
    border-radius: 50%;
    margin-left: 8px;
    position: relative;
    vertical-align: middle;
}

.number-cell span::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: var(--tigres-yellow);
    border-radius: 50%;
    bottom: 1px;
    left: 1px;
}

.title-cell {
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding-bottom: 5px;
    grid-row: 2;
    grid-column: 1;
}

.text-cell {
    font-size: 0.85rem;
    line-height: 1.3;
    padding: 10px 20px 5px 20px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    text-align: right;
    border-left: 1px solid #eee;
}

.empty-cell {
    grid-row: 1;
    grid-column: 1;
}

/* Double Dot Effect */
.double-dot {
    position: relative;
    width: 18px;
    height: 18px;
    margin-right: 15px;
    flex-shrink: 0;
}

.dot-yellow {
    position: absolute;
    top: -4px;
    left: -4px;
    width: 16px;
    height: 16px;
    background-color: var(--tigres-yellow);
    border-radius: 50%;
    z-index: 1;
}

.dot-blue {
    position: absolute;
    top: 0;
    left: 0;
    width: 16px;
    height: 16px;
    background-color: var(--tigres-blue);
    border-radius: 50%;
    z-index: 2;
}

/* How It Works Mobile Card */
.how-it-works-mobile {
    margin: 0 16px 24px 16px;
}

.how-it-works-mobile-card {
    border: 1px solid #eee;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.hiw-mobile-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.hiw-mobile-title {
    font-weight: 700;
    font-size: 1.1rem;
}

.hiw-step {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
}

.hiw-step-text {
    font-size: 0.9rem;
    line-height: 1.4;
    flex: 1;
    padding-right: 12px;
}

.hiw-step-number {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--tigres-yellow);
    line-height: 1;
    display: flex;
    align-items: flex-end;
    flex-shrink: 0;
}

.hiw-step-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    background-color: var(--tigres-blue);
    border-radius: 50%;
    margin-left: 6px;
    position: relative;
    vertical-align: middle;
}

.hiw-step-dot::after {
    content: '';
    position: absolute;
    width: 9px;
    height: 9px;
    background-color: var(--tigres-yellow);
    border-radius: 50%;
    bottom: 1px;
    left: 1px;
}

.hiw-divider {
    height: 1px;
    background-color: #eee;
}

/* Landing 2 Styles */
.registration-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.banner-container {
    width: 100%;
    margin-bottom: 40px;
    border-radius: 20px;
    overflow: hidden;
}

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

.form-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.side-image-container {
    border-radius: 20px;
    overflow: hidden;
}

.side-img {
    width: 100%;
    height: auto;
    max-height: 550px;
    display: block;
    object-fit: cover;
}

.reg-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.reg-subtitle {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

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

.form-control {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.notice-box {
    background-color: #f0f2f5;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    gap: 10px;
    font-size: 0.85rem;
    margin-top: 20px;
}

.notice-icon {
    background-color: #BCBECC;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.terms-check {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    font-size: 0.85rem;
}

.terms-check input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.terms-check input[type="checkbox"]:checked {
    background-color: var(--tigres-blue);
    border-color: var(--tigres-blue);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23FFBB00' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
    background-size: 14px;
    background-position: center;
    background-repeat: no-repeat;
}

.btn-registrar {
    width: 100%;
    background-color: var(--tigres-yellow);
    color: var(--tigres-text);
    border: none;
    padding: 15px;
    font-weight: 700;
    border-radius: 8px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s;
}

.btn-registrar:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Phone input with country code */
.phone-input-group {
    display: flex;
}

.country-code-select {
    max-width: 130px;
    border-radius: 8px 0 0 8px;
    border: 1px solid #ddd;
    border-right: none;
    padding: 12px 8px;
    font-size: 0.95rem;
    background-color: #f8f9fa;
    cursor: pointer;
}

.phone-input-group .form-control {
    border-radius: 0 8px 8px 0;
}

/* Fan Found / Not Found Modal */
.fan-modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.fan-modal-content .modal-header {
    padding: 20px 24px 0;
}

.fan-modal-content .modal-title {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--tigres-text);
}

.fan-modal-content .modal-body {
    padding: 20px 24px;
}

.fan-modal-content .modal-footer {
    padding: 0 24px 24px;
}

/* Welcome Modal */
.welcome-modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.welcome-modal-content .modal-body {
    padding: 40px 32px;
    background: linear-gradient(180deg, #fff 0%, #f8f9ff 100%);
}

.welcome-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background-color: rgba(255, 187, 0, 0.1);
    border-radius: 50%;
    animation: welcomePulse 2s ease-in-out infinite;
}

@keyframes welcomePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.welcome-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--tigres-text);
    margin-bottom: 12px;
}

.welcome-message {
    font-size: 1rem;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.5;
}

.welcome-badge-img {
    display: inline-block;
    margin-top: 8px;
}

.welcome-badge-img img {
    width: 220px;
    height: auto;
}

.fan-icon-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background-color: #f0f4ff;
    border-radius: 50%;
}

.fan-name-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000;
    letter-spacing: 1px;
    display: inline-block;
}

.btn-send-otp {
    background-color: var(--tigres-yellow);
    color: var(--tigres-text);
    border: none;
    padding: 12px;
    font-weight: 700;
    border-radius: 8px;
    transition: transform 0.2s;
}

.btn-send-otp:hover {
    transform: scale(1.02);
    background-color: #e5a800;
    color: var(--tigres-text);
}

.btn-send-otp:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* OTP Input */
.otp-input-wrapper {
    display: flex;
    justify-content: center;
}

.otp-input {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.5em;
    max-width: 260px;
    padding: 10px 16px;
    border: 2px solid #ddd;
    border-radius: 10px;
    transition: border-color 0.2s;
}

.otp-input:focus {
    border-color: var(--tigres-blue);
    box-shadow: 0 0 0 3px rgba(0, 51, 204, 0.15);
    outline: none;
}

/* OTP Success */
.otp-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background-color: #e8f5e9;
    border-radius: 50%;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Tablet (max-width: 992px) */
@media (max-width: 992px) {
    .form-section {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .side-image-container {
        order: -1;
        max-height: 300px;
    }

    .side-img {
        height: 300px;
    }

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

    .hero-subtitle {
        font-size: 1.3rem;
    }

    .hero-desc {
        font-size: 1.1rem;
    }
}

/* Mobile (max-width: 767px) */
@media (max-width: 767px) {

    /* --- Header --- */
    .header-landing {
        padding: 10px 16px;
    }

    .logo-img {
        height: 60px;
    }

    /* --- Hero Section ---
       Remove absolute positioning so content flows naturally below the title.
       The hero-section itself stacks title then content vertically. */
    .hero-section {
        flex-grow: 0;
        padding: 24px 16px 16px 16px;
        min-height: unset;
    }

    .hero-content {
        position: static;
        transform: none;
        width: 100%;
        text-align: center;
        margin-top: 20px;
    }

    .hero-title {
        font-size: 2.8rem;
        font-weight: 800;
        line-height: 1.1;
        margin-bottom: 0;
        width: 100%;
    }

    .hero-subtitle {
        font-size: 1.15rem;
        margin-bottom: 4px;
    }

    .hero-desc {
        font-size: 1rem;
        margin-bottom: 24px;
    }

    /* Full-width button on mobile */
    .btn-unirme {
        width: 100%;
        justify-content: center;
        padding: 16px 20px;
        font-size: 1rem;
    }

    /* --- Registration page --- */
    .registration-container {
        padding: 12px;
    }

    .banner-container {
        margin-bottom: 16px;
        border-radius: 12px;
    }

    .form-section {
        gap: 16px;
    }

    .side-image-container {
        max-height: unset;
        border-radius: 12px;
    }

    .side-img {
        height: auto;
        max-height: 300px;
        object-fit: cover;
        width: 100%;
    }

    .reg-title {
        font-size: 1.3rem;
        margin-bottom: 8px;
    }

    .reg-subtitle {
        font-size: 1rem;
        margin-bottom: 16px;
    }

    /* Single-column form fields on mobile */
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* --- Modals: ensure they fit mobile screens --- */
    .fan-modal-content .modal-header {
        padding: 16px 16px 0;
    }

    .fan-modal-content .modal-body {
        padding: 16px;
    }

    .fan-modal-content .modal-footer {
        padding: 0 16px 20px;
    }

    .fan-name-display {
        font-size: 1.2rem;
    }

    .otp-input {
        font-size: 1.5rem;
        max-width: 220px;
    }
}
