* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Portal do Aluno Button */
.portal-button-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.portal-button {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #5D4E42 0%, #4A3F36 100%);
    color: #FFFFFF;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(93, 78, 66, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.portal-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(93, 78, 66, 0.4);
    background: linear-gradient(135deg, #4A3F36 0%, #3d342d 100%);
}

.portal-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(93, 78, 66, 0.3);
}

.hero-section {
    display: grid;
    grid-template-columns: 40% 60%;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 1;
}

.left-side {
    background: #EAE4DE;
    padding: 40px 0 0 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.left-side::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    right: -10%;
    bottom: -10%;
    background-image: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 80px,
        rgba(93, 78, 66, 0.05) 80px,
        rgba(93, 78, 66, 0.05) 81px
    );
    z-index: 1;
    pointer-events: none;
}

.hero-image {
    width: 95%;
    height: auto;
    max-height: 100vh;
    object-fit: contain;
    object-position: center bottom;
    position: relative;
    z-index: 10;
    margin-bottom: 0;
}

.right-side {
    background: #F5F1ED;
    padding: 60px 80px 60px 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

.right-content {
    max-width: 750px;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    margin: 0 auto;
}

.form-container {
    max-width: 100%;
    margin: 60px auto 0 auto;
    background: transparent;
    padding: 40px 0 0 0;
    border: none;
    position: relative;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #5D4E42 0%, #4A3F36 100%);
    border-radius: 2px;
}

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

h1 {
    color: #1a202c;
    font-size: clamp(1.5rem, 6vw, 3.8em);
    margin-bottom: 24px;
    line-height: 1.1;
    font-weight: 400;
    letter-spacing: -1px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.subhead {
    color: #4a5568;
    font-size: clamp(0.8rem, 2.5vw, 1.15em);
    line-height: 2.0;
    margin-bottom: 10px;
    font-weight: 300;
    letter-spacing: 0.3px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* Ajustes para telas grandes - reduz espaçamentos excessivos */
@media (min-height: 900px) {
    .subhead {
        margin-bottom: 35px;
    }

    .form-container {
        margin-top: 45px;
    }
}

@media (min-height: 1000px) {
    .subhead {
        margin-bottom: 40px;
    }

    .form-container {
        margin-top: 50px;
    }
}

.intro-text {
    color: #4a5568;
    font-size: 1.05em;
    line-height: 1.8;
    margin-bottom: 25px;
}

.highlight-text {
    color: #2d3748;
    font-weight: 600;
    font-size: 1.1em;
    line-height: 1.8;
    margin-bottom: 35px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.4);
    border-left: 4px solid #2d3748;
    border-radius: 4px;
}

.form-title {
    color: #1a202c;
    font-size: clamp(1rem, 3vw, 1.6em);
    margin-bottom: 12px;
    font-weight: 500;
    letter-spacing: -0.5px;
}

.form-subtitle {
    color: #4a5568;
    font-size: clamp(0.75rem, 2vw, 1em);
    margin-bottom: 35px;
    font-weight: 300;
}

.form-group {
    margin-bottom: clamp(16px, 3vw, 24px);
}

.form-group label {
    display: block;
    color: #2d3748;
    font-weight: 500;
    margin-bottom: 10px;
    font-size: clamp(0.7rem, 2vw, 0.9em);
    letter-spacing: 0.3px;
}

.form-group input {
    width: 100%;
    padding: clamp(10px, 2.5vw, 16px) clamp(12px, 3vw, 18px);
    border: 1.5px solid #A0AEC0;
    border-radius: 8px;
    font-size: clamp(0.85rem, 2.2vw, 1em);
    transition: all 0.3s;
    font-family: inherit;
    background: #FFFFFF;
    color: #2d3748;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.form-group input::placeholder {
    color: #CBD5E0;
}

.form-group input:focus {
    outline: none;
    border-color: #5D4E42;
    box-shadow: 0 0 0 3px rgba(93, 78, 66, 0.1);
}

.submit-btn {
    width: 100%;
    padding: clamp(12px, 3vw, 18px);
    background: #5D4E42;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: clamp(0.9rem, 2.5vw, 1.05em);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: clamp(20px, 4vw, 32px);
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    background: #4A3F36;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(93, 78, 66, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(93, 78, 66, 0.2);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.closing-message {
    margin-top: 30px;
    text-align: center;
    font-size: 1.1em;
    color: #2d3748;
    font-weight: 600;
    line-height: 1.6;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Media Queries - Consolidadas */
@media (max-width: 1024px) {
    .hero-section {
        grid-template-columns: 1fr;
    }

    .left-side {
        height: 55vh;
        min-height: 420px;
        max-height: 55vh;
        order: -1;
    }

    .right-side {
        padding: 45px 35px;
        min-height: auto;
    }

    h1 {
        font-size: 2.2em;
        line-height: 1.3;
    }

    .subhead {
        font-size: 1.05em;
        line-height: 1.7;
    }

    .form-container {
        padding: 25px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    .hero-section {
        grid-template-columns: 35% 65%;
        min-height: 100vh;
    }

    .right-side {
        padding: 50px 40px;
    }

    .right-content {
        max-width: 90%;
    }

    .form-container {
        max-width: 85%;
    }

    h1 {
        font-size: 2.2em;
    }

    .subhead {
        font-size: 0.95em;
    }

    .hero-image {
        width: 120%;
        height: 120%;
        min-height: 100%;
        object-fit: cover;
        object-position: center 30%;
    }

    .left-side {
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        min-height: 100vh;
    }
}

@media (max-width: 900px) {
    .right-side {
        padding: 40px 30px;
    }

    h1 {
        font-size: 2em;
    }

    .subhead {
        font-size: 1em;
    }
}

@media (max-width: 600px) {
    body {
        overflow-x: hidden;
        width: 100%;
    }

    .portal-button-container {
        top: 10px;
        right: 10px;
    }

    .portal-button {
        padding: 10px 18px;
        font-size: 14px;
    }

    .hero-section {
        height: auto;
        position: relative;
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100vw;
    }

    .left-side {
        height: 60vh;
        min-height: 400px;
        max-height: 60vh;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 1;
        background: linear-gradient(to bottom, #EAE4DE 0%, #EAE4DE 85%, rgba(234, 228, 222, 0) 100%);
    }

    .left-side::before {
        display: none;
    }

    .hero-image {
        width: 100%;
        max-height: 100%;
        object-position: center center;
    }

    .right-side {
        padding: 35px 30px 50px 30px;
        position: relative;
        z-index: 2;
        margin-top: 50vh;
        min-height: auto;
        height: auto;
        width: 100%;
        max-width: 100vw;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
        overflow-y: visible;
        overflow-x: hidden;
        display: block;
        align-items: unset;
        justify-content: unset;
        box-sizing: border-box;
    }

    .right-content {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }

    .form-container {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
        padding: 25px 20px;
    }

    h1 {
        font-size: 1.75em;
        margin-bottom: 20px;
        line-height: 1.4;
        word-wrap: break-word;
    }

    .subhead {
        font-size: 1em;
        margin-bottom: 25px;
        line-height: 1.7;
        word-wrap: break-word;
    }

    .form-title {
        font-size: 1.2em;
        margin-bottom: 6px;
    }

    .form-subtitle {
        font-size: 0.85em;
        margin-bottom: 20px;
    }

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

    .form-row {
        gap: 0;
    }

    .form-row .form-group {
        margin-bottom: 18px;
    }

    .form-group label {
        font-size: 0.75em;
        margin-bottom: 6px;
    }

    .form-group input {
        padding: 10px 12px;
        font-size: 0.9em;
        width: 100%;
        box-sizing: border-box;
    }

    .submit-btn {
        padding: 12px;
        font-size: 0.95em;
        margin-top: 22px;
        width: 100%;
        box-sizing: border-box;
        border-radius: 12px;
    }
}
