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

body {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #2C2C2C;
    background: #F4F4F4;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Hero background section - WITH PROPER SPACING */
.hero-with-bg {
    background-image: url('../img/hero/hero_HAAD.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    overflow: hidden;
}

.hero-with-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 112, 192, 0.7), rgba(237, 85, 165, 0.6));
    z-index: 1;
}

/* Register container - CENTERED */
.container.register {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.row {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0;
}

/* Form rows for side-by-side fields */
.form-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    margin: 0 0 20px 0;
}

.column {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0;
    align-items: center;
}

/* Form columns for side-by-side fields */
.form-column {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* CakePHP column classes - FORCED CENTERING */
.column-50 {
    width: 100%;
    max-width: 900px;
    display: flex !important;
    justify-content: center !important;
}

.column-offset-25 {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Register form card - LARGER WITH MORE PADDING */
.users.form.content {
    background: white;
    border-radius: 24px;
    padding: 80px 60px;
    box-shadow: 0 25px 80px rgba(0, 112, 192, 0.12);
    border: 1px solid rgba(237, 85, 165, 0.08);
    width: 100%;
    max-width: 850px;
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    text-align: center;
}

.users.form.content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(237, 85, 165, 0.01), rgba(0, 112, 192, 0.01));
    border-radius: 24px;
    pointer-events: none;
}

.users.form.content > * {
    position: relative;
    z-index: 2;
}

/* Form styling */
fieldset {
    border: none;
    padding: 0;
    margin: 0 0 30px 0;
}

/* Main heading */
legend {
    font-family: 'Playfair Display', serif;
    font-size: 2.4rem;
    font-weight: 600;
    color: #2C2C2C;
    margin-bottom: 12px;
    position: relative;
    text-align: center;
    width: 100%;
    padding: 0;
    border: none;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

legend::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: linear-gradient(135deg, #ED55A5, #5BC8D2);
    border-radius: 1px;
}

/* Subtitle */
.register-subtitle {
    color: #666;
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 30px;
    font-style: italic;
}

/* CakePHP input wrapper */
.input {
    margin-bottom: 20px !important;
    width: 100%;
    text-align: left;
}

/* Row input styling for side-by-side fields */
.form-row .input {
    margin-bottom: 0 !important;
}

/* Form labels - hidden like login page */
.input label {
    display: none;
}

/* Input fields */
.input input[type="email"],
.input input[type="password"],
.input input[type="text"],
.input input[type="file"],
.input select {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid rgba(200, 200, 200, 0.3);
    border-radius: 12px;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    background: rgba(248, 249, 250, 0.5);
    transition: all 0.3s ease;
    color: #2C2C2C;
    box-sizing: border-box;
}

/* File input specific styling */
.input input[type="file"] {
    padding: 12px 16px;
    cursor: pointer;
    background: rgba(248, 249, 250, 0.8);
}

.input input:focus,
.input select:focus {
    outline: none;
    border-color: #ED55A5;
    background: white;
    box-shadow: 0 0 0 0.15rem rgba(237, 85, 165, 0.08);
    transform: translateY(-1px);
}

.input input::placeholder {
    color: rgba(120, 120, 120, 0.8);
    font-weight: 400;
}

/* reCAPTCHA container */
.recaptcha-container {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

/* Button styling */
.button,
button,
input[type="submit"] {
    width: 100%;
    padding: 16px 20px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    text-align: center;
    box-sizing: border-box;
    min-height: 54px;
    line-height: 1.2;
    font-family: 'Inter', sans-serif;
    margin-bottom: 12px;
    border: 2px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Primary register button */
button[type="submit"],
input[type="submit"] {
    background: linear-gradient(135deg, #C8860D, #ED55A5);
    color: white;
    box-shadow: 0 8px 25px rgba(200, 134, 13, 0.3);
    margin-bottom: 20px;
    font-weight: 700;
}

button[type="submit"]:hover,
input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(200, 134, 13, 0.4);
}

/* Outline button */
.button-outline {
    background: transparent !important;
    color: #ED55A5 !important;
    border: 2px solid #ED55A5 !important;
    box-shadow: none !important;
    font-weight: 600 !important;
}

.button-outline:hover {
    background: #ED55A5 !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(237, 85, 165, 0.25) !important;
    text-decoration: none;
}

/* Clear button */
.button-clear {
    background: transparent !important;
    color: #666 !important;
    border: 2px solid rgba(102, 102, 102, 0.2) !important;
    box-shadow: none !important;
    font-weight: 500 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.button-clear:hover {
    background: rgba(102, 102, 102, 0.05) !important;
    color: #2C2C2C !important;
    border-color: rgba(102, 102, 102, 0.4) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
    text-decoration: none;
}

/* Float right for back to login button */
.float-right {
    float: right;
    width: auto !important;
    padding: 14px 30px !important;
    margin-left: 15px;
}

/* Clear floats */
.users.form.content::after {
    content: "";
    display: table;
    clear: both;
}

/* Text between buttons */
.signup-text {
    color: #666;
    font-size: 0.95rem;
    margin: 25px 0 12px 0;
    font-weight: 400;
}

/* HR separator */
.hr-between-buttons {
    border: none;
    height: 1px;
    background: linear-gradient(135deg, rgba(237, 85, 165, 0.2), rgba(91, 200, 210, 0.2));
    margin: 25px 0;
    border-radius: 1px;
}

/* Flash messages */
.flash-message,
.message {
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
    text-align: center;
}

.flash-success,
.message.success {
    background: rgba(40, 167, 69, 0.08);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.15);
}

.flash-error,
.message.error {
    background: rgba(220, 53, 69, 0.08);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.15);
}

/* Error messages */
.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 5px;
}

.invalid-feedback i {
    margin-right: 4px;
}

/* Password field specific error positioning */
.password-error,
.password-confirm-error {
    margin-top: 10px;
    margin-bottom: 10px;
}

/* Alert messages */
.alert {
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
    text-align: center;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.08);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.15);
}

.alert-danger i {
    margin-right: 8px;
}

/* Password info icon */
.password-info-icon {
    color: #6c757d;
    cursor: help;
    font-size: 0.9rem;
    margin-left: 5px;
    position: relative;
    display: inline-block;
}

.password-info-icon:hover::after {
    content: "Password must be at least 8 characters long and contain at least one uppercase letter, one lowercase letter, and one number.";
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    width: 280px;
    padding: 8px 12px;
    background-color: #333;
    color: white;
    border-radius: 4px;
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    margin-top: 5px;
}

/* Password requirements section */
.password-requirements {
    margin: 20px 0;
    padding: 16px;
    background: rgba(237, 85, 165, 0.05);
    border: 1px solid rgba(237, 85, 165, 0.1);
    border-radius: 8px;
}

.password-requirements h4 {
    margin: 0 0 10px 0;
    color: #ED55A5;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.password-requirements ul {
    margin: 0;
    padding-left: 20px;
    list-style-type: disc;
}

.password-requirements li {
    color: #2C2C2C;
    font-size: 0.9rem;
    margin-bottom: 4px;
    line-height: 1.4;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.users.form.content {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Desktop specific styles */
@media screen and (min-width: 1025px) {
    .hero-with-bg {
        padding: 80px 20px;
        background-attachment: fixed;
    }

    .container.register {
        max-width: 1200px;
        padding: 20px;
    }

    .users.form.content {
        padding: 90px 70px;
        max-width: 950px;
        border-radius: 28px;
    }

    .column-50 {
        max-width: 1000px;
        display: flex !important;
        justify-content: center !important;
    }

    legend {
        font-size: 2.8rem;
        margin-bottom: 15px;
        letter-spacing: 1px;
    }

    .register-subtitle {
        font-size: 1.1rem;
        margin-bottom: 35px;
    }

    .input {
        margin-bottom: 22px !important;
    }

    .form-row {
        gap: 25px;
        margin-bottom: 22px;
    }

    .input input[type="email"],
    .input input[type="password"],
    .input input[type="text"],
    .input input[type="file"],
    .input select {
        padding: 18px 24px;
        font-size: 17px;
        border-radius: 14px;
    }

    .button,
    button,
    input[type="submit"] {
        padding: 18px 24px;
        font-size: 17px;
        min-height: 58px;
        border-radius: 14px;
        margin-bottom: 15px;
    }

    .float-right {
        padding: 16px 35px !important;
    }

    .signup-text {
        margin: 30px 0 15px 0;
        font-size: 1rem;
    }

    .hr-between-buttons {
        margin: 30px 0;
    }
}

/* Large Desktop */
@media screen and (min-width: 1440px) {
    .hero-with-bg {
        padding: 100px 25px;
    }

    .container.register {
        max-width: 1400px;
    }

    .users.form.content {
        padding: 100px 80px;
        max-width: 1100px;
        border-radius: 32px;
    }

    .column-50 {
        max-width: 1200px;
        display: flex !important;
        justify-content: center !important;
    }

    legend {
        font-size: 3.2rem;
        margin-bottom: 18px;
    }

    .register-subtitle {
        font-size: 1.15rem;
        margin-bottom: 40px;
    }

    .form-row {
        gap: 30px;
    }

    .input input[type="email"],
    .input input[type="password"],
    .input input[type="text"],
    .input input[type="file"],
    .input select {
        padding: 20px 26px;
        font-size: 18px;
        border-radius: 16px;
    }

    .button,
    button,
    input[type="submit"] {
        padding: 20px 26px;
        font-size: 18px;
        min-height: 62px;
        border-radius: 16px;
    }

    .float-right {
        padding: 18px 40px !important;
    }
}

/* Tablet styles */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .hero-with-bg {
        padding: 60px 20px;
        background-attachment: scroll;
    }

    .container.register {
        max-width: 800px;
        padding: 20px;
    }

    .users.form.content {
        padding: 60px 50px;
        border-radius: 24px;
        max-width: 750px;
    }

    legend {
        font-size: 2.4rem;
        margin-bottom: 14px;
    }

    .register-subtitle {
        font-size: 1.05rem;
        margin-bottom: 30px;
    }

    .form-row {
        gap: 20px;
        margin-bottom: 20px;
    }

    .input input[type="email"],
    .input input[type="password"],
    .input input[type="text"],
    .input input[type="file"],
    .input select {
        padding: 16px 22px;
        font-size: 16px;
        border-radius: 13px;
    }

    .button,
    button,
    input[type="submit"] {
        padding: 17px 22px;
        font-size: 16px;
        min-height: 56px;
        border-radius: 13px;
        margin-bottom: 14px;
    }

    .float-right {
        padding: 15px 30px !important;
    }

    .signup-text {
        margin: 28px 0 14px 0;
    }
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    .hero-with-bg {
        padding: 40px 15px;
        min-height: 100vh;
        background-attachment: scroll;
    }

    .container.register {
        max-width: 100%;
        padding: 15px;
    }

    .users.form.content {
        padding: 50px 30px;
        border-radius: 20px;
        max-width: 100%;
        margin: 0;
        width: 100%;
    }

    legend {
        font-size: 2.1rem;
        margin-bottom: 10px;
        letter-spacing: 0.3px;
    }

    .register-subtitle {
        font-size: 0.95rem;
        margin-bottom: 25px;
    }

    .input {
        margin-bottom: 18px !important;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
        margin-bottom: 18px;
    }

    .form-row .input {
        margin-bottom: 18px !important;
    }

    .input input[type="email"],
    .input input[type="password"],
    .input input[type="text"],
    .input input[type="file"],
    .input select {
        padding: 14px 18px;
        font-size: 16px;
        border-radius: 10px;
    }

    .button,
    button,
    input[type="submit"] {
        padding: 14px 20px;
        font-size: 15px;
        min-height: 50px;
        border-radius: 10px;
        margin-bottom: 12px;
    }

    .float-right {
        float: none !important;
        width: 100% !important;
        padding: 14px 20px !important;
        margin-left: 0 !important;
        margin-top: 12px;
    }

    .signup-text {
        margin: 20px 0 10px 0;
        font-size: 0.9rem;
    }

    .hr-between-buttons {
        margin: 20px 0;
    }

    .column-50,
    .column-offset-25 {
        width: 100% !important;
        margin-left: 0 !important;
        padding: 0 !important;
    }
}

/* Mobile phones */
@media screen and (max-width: 480px) {
    .hero-with-bg {
        padding: 30px 10px;
    }

    .container.register {
        padding: 10px;
    }

    .users.form.content {
        padding: 40px 25px;
        border-radius: 18px;
    }

    legend {
        font-size: 1.9rem;
        margin-bottom: 8px;
    }

    .register-subtitle {
        font-size: 0.9rem;
        margin-bottom: 22px;
    }

    legend::after {
        width: 60px;
        height: 2px;
        bottom: -5px;
    }

    .input {
        margin-bottom: 16px !important;
    }

    .form-row .input {
        margin-bottom: 16px !important;
    }

    .input input[type="email"],
    .input input[type="password"],
    .input input[type="text"],
    .input input[type="file"],
    .input select {
        padding: 12px 16px;
        font-size: 16px;
        border-radius: 9px;
    }

    .button,
    button,
    input[type="submit"] {
        padding: 12px 18px;
        font-size: 14px;
        min-height: 46px;
        border-radius: 9px;
        margin-bottom: 10px;
    }

    .float-right {
        padding: 12px 18px !important;
    }

    .signup-text {
        margin: 18px 0 8px 0;
        font-size: 0.85rem;
    }

    .hr-between-buttons {
        margin: 18px 0;
    }
}

/* Very small screens */
@media screen and (max-width: 360px) {
    .hero-with-bg {
        padding: 25px 8px;
    }

    .container.register {
        padding: 8px;
    }

    .users.form.content {
        padding: 35px 20px;
        border-radius: 16px;
    }

    legend {
        font-size: 1.7rem;
        margin-bottom: 6px;
    }

    .register-subtitle {
        font-size: 0.85rem;
        margin-bottom: 20px;
    }

    .input input[type="email"],
    .input input[type="password"],
    .input input[type="text"],
    .input input[type="file"],
    .input select {
        padding: 10px 14px;
        font-size: 16px;
    }

    .button,
    button,
    input[type="submit"] {
        padding: 10px 16px;
        font-size: 13px;
        min-height: 42px;
    }

    .float-right {
        padding: 10px 16px !important;
    }
}

/* Focus states for accessibility */
.button:focus,
button:focus,
input:focus {
    outline: 2px solid #ED55A5;
    outline-offset: 2px;
}

/* Ensure proper text color inheritance */
.button,
.button:visited,
.button:hover,
button,
input[type="submit"] {
    text-decoration: none;
}

.button-outline:visited {
    color: #ED55A5 !important;
}

.button-clear:visited {
    color: #666 !important;
}

/* CakePHP Flash element support */
.flash {
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
    text-align: center;
}

/* Hidden input for reCAPTCHA */
input[type="hidden"] {
    display: none;
}
