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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    background: #f0f2f5;
    margin: 0;
    padding: 0;
}

/* Left Side - Login Form */
.login-section {
    flex: 1;
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    min-height: 100vh;
    position: relative;
}

/* Right Side - Hero Section with Background */
.hero-section {
    flex: 1;
    background-image: url('../images/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 60px;
    min-height: 100vh;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(45, 85, 155, 0.85);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 500px;
}

.hero-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 30px;
}

.read-more-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fff;
    margin: 2% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: #ea4c46;
    color: white;
    padding: 25px 30px;
    border-radius: 12px 12px 0 0;
    position: relative;
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    padding-right: 40px;
}

.close {
    color: white;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.close:hover,
.close:focus {
    opacity: 0.7;
}

.modal-body {
    padding: 30px;
    line-height: 1.6;
    color: #333;
}

.modal-body h2 {
    color: #667eea;
    font-size: 20px;
    margin-top: 25px;
    margin-bottom: 15px;
    font-weight: 600;
}

.modal-body h2:first-child {
    margin-top: 0;
}

.modal-body p {
    margin-bottom: 16px;
    text-align: justify;
}

.modal-body .highlight {
    background: linear-gradient(120deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    margin: 20px 0;
}

.modal-body .contact-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 25px;
}

.modal-body .contact-info h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 18px;
}

.modal-body .contact-info p {
    margin-bottom: 8px;
}

.modal-body .contact-info a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.modal-body .contact-info a:hover {
    text-decoration: underline;
}

/* Mobile modal responsiveness */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 85vh;
        border-radius: 10px;
    }

    .modal-header {
        padding: 20px 25px;
        border-radius: 10px 10px 0 0;
    }

    .modal-title {
        font-size: 20px;
        padding-right: 35px;
    }

    .modal-body {
        padding: 25px 20px;
        font-size: 14px;
    }

    .modal-body h2 {
        font-size: 18px;
        margin-top: 20px;
        margin-bottom: 12px;
    }

    .modal-body p {
        margin-bottom: 14px;
    }

    .close {
        font-size: 24px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 98%;
        margin: 2% auto;
        max-height: 90vh;
        border-radius: 8px;
    }

    .modal-header {
        padding: 18px 20px;
        border-radius: 8px 8px 0 0;
    }

    .modal-title {
        font-size: 18px;
        padding-right: 30px;
    }

    .modal-body {
        padding: 20px 15px;
        font-size: 13px;
    }

    .modal-body h2 {
        font-size: 16px;
        margin-top: 18px;
        margin-bottom: 10px;
    }

    .modal-body .highlight {
        padding: 15px;
        margin: 15px 0;
    }

    .modal-body .contact-info {
        padding: 15px;
        margin-top: 20px;
    }

    .modal-body .contact-info h3 {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .close {
        font-size: 22px;
        right: 12px;
    }
}

@media (max-width: 360px) {
    .modal-content {
        width: 99%;
        margin: 1% auto;
        border-radius: 6px;
    }

    .modal-header {
        padding: 15px 18px;
        border-radius: 6px 6px 0 0;
    }

    .modal-title {
        font-size: 16px;
        padding-right: 28px;
    }

    .modal-body {
        padding: 18px 12px;
        font-size: 12px;
    }

    .modal-body h2 {
        font-size: 15px;
        margin-top: 15px;
        margin-bottom: 8px;
    }

    .modal-body .highlight {
        padding: 12px;
        margin: 12px 0;
    }

    .modal-body .contact-info {
        padding: 12px;
        margin-top: 18px;
    }

    .close {
        font-size: 20px;
        right: 10px;
    }
}

.login-container {
    width: 100%;
    max-width: 520px;
    background: white;
    padding: 50px 50px 40px 50px;
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1), 0 5px 15px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 10;
    transform: translateY(-20px);
}

/* Floating arrow pointer */
.login-container::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-bottom: 15px solid white;
    filter: drop-shadow(0 -3px 3px rgba(0, 0, 0, 0.1));
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-label {
    display: none;
}

.form-input {
    width: 100%;
    padding: 16px;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    border-color: #667eea;
}

.form-input::placeholder {
    color: #999;
}

.password-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 12px;
    padding: 5px;
}

.forgot-password {
    text-align: right;
    margin-bottom: 25px;
}

.forgot-password a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    background: #ea4c46;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-btn:hover {
    background: #d63031;
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 12px;
}

.remember-me {
    display: flex;
    align-items: center;
    color: #999;
}

.remember-me input {
    margin-right: 8px;
    transform: scale(0.9);
}

.signup-link {
    text-align: center;
    color: #999;
    font-size: 12px;
    margin-top: 20px;
}

.signup-link a {
    color: #5DADE2;
    text-decoration: none;
}

.signup-link a:hover {
    text-decoration: underline;
}

.divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
    color: #999;
    font-size: 14px;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e1e5e9;
    z-index: 1;
}

.divider span {
    background: rgba(255, 255, 255, 0.95);
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.signup-link {
    text-align: center;
    color: #666;
    font-size: 14px;
}

.signup-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.signup-link a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Tablet Responsiveness - Form only with background */
@media (max-width: 1366px) and (min-width: 1025px) {
    body {
        flex-direction: column;
        background-image: url('../images/background.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        background-attachment: scroll;
        position: relative;
        min-height: 100vh;
    }

    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(45, 85, 155, 0.85);
        z-index: 1;
    }

    .login-section {
        order: 1;
        min-height: 100vh;
        padding: 40px;
        background: transparent;
        flex: none;
        width: 100%;
        position: relative;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero-section {
        display: none; /* Hide hero section on tablets */
    }

    .login-container {
        max-width: 500px;
        width: 100%;
        padding: 50px 45px 40px 45px;
        transform: translateY(0);
        margin: 0;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        border-radius: 12px;
    }

    .login-container::before,
    .login-container::after {
        display: none;
    }

    .logo {
        max-width: 280px;
        width: 100%;
        height: auto;
    }

    .form-input {
        padding: 18px 16px;
        font-size: 16px;
        border-radius: 8px;
    }

    .login-btn {
        padding: 18px;
        font-size: 16px;
        font-weight: 600;
        border-radius: 8px;
    }

    .remember-forgot {
        font-size: 14px;
    }

    .signup-link {
        font-size: 14px;
    }
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .login-container {
        max-width: 450px;
        padding: 45px 35px 35px 35px;
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
        background-image: url('../images/background.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        background-attachment: scroll;
        position: relative;
        min-height: 100vh;
    }

    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(45, 85, 155, 0.85);
        z-index: 1;
    }

    .login-section {
        order: 1;
        min-height: 100vh;
        padding: 20px;
        background: transparent;
        flex: none;
        width: 100%;
        position: relative;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero-section {
        display: none;
    }

    .login-container {
        max-width: 100%;
        width: 100%;
        padding: 35px 25px 25px 25px;
        transform: translateY(0);
        margin: 0;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
    }

    .login-container::before,
    .login-container::after {
        display: none;
    }

    .logo {
        max-width: 180px;
        width: 100%;
        height: auto;
    }

    .form-input {
        padding: 16px 14px;
        font-size: 16px;
        border-radius: 6px;
    }

    .login-btn {
        padding: 16px;
        font-size: 14px;
        font-weight: 600;
    }

    .remember-forgot {
        font-size: 13px;
    }

    .signup-link {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    body {
        background-attachment: scroll;
    }

    .login-section {
        padding: 15px;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .login-container {
        padding: 30px 20px 20px 20px;
        border-radius: 12px;
        margin: 0;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(8px);
        width: 100%;
        max-width: 100%;
    }

    .logo {
        max-width: 160px;
        margin-bottom: 25px;
    }

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

    .form-input {
        padding: 15px 12px;
        font-size: 16px;
        border-radius: 8px;
        width: 100%;
    }

    .login-btn {
        padding: 15px;
        font-size: 14px;
        border-radius: 8px;
        width: 100%;
    }

    .remember-forgot {
        margin-bottom: 20px;
        font-size: 12px;
    }

    .signup-link {
        font-size: 12px;
        margin-top: 15px;
    }
}

/* Landscape orientation for tablets */
@media (max-width: 1024px) and (orientation: landscape) {
    .login-container {
        transform: translateY(-10px);
    }
}

/* For very small screens */
@media (max-width: 360px) {
    .login-section {
        padding: 10px;
    }

    .login-container {
        padding: 25px 15px 15px 15px;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(8px);
        border-radius: 10px;
    }
    
    .logo {
        max-width: 140px;
        margin-bottom: 20px;
    }

    .form-group {
        margin-bottom: 18px;
    }
    
    .form-input {
        padding: 14px 10px;
        font-size: 16px;
        border-radius: 6px;
    }

    .login-btn {
        padding: 14px;
        font-size: 13px;
        border-radius: 6px;
    }

    .remember-forgot {
        font-size: 11px;
        margin-bottom: 18px;
    }

    .signup-link {
        font-size: 11px;
        margin-top: 12px;
    }
}

/* Landscape orientation optimizations */
@media (max-height: 600px) and (orientation: landscape) {
    .login-section {
        padding: 10px;
        justify-content: center;
    }

    .login-container {
        padding: 20px 25px;
        margin: 10px 0;
    }

    .logo {
        max-width: 120px;
        margin-bottom: 15px;
    }

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

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .login-container {
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    }
}

/* For tablets in portrait */
@media (min-width: 769px) and (max-width: 1024px) {
    body {
        flex-direction: column;
        background-image: url('../images/background.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        background-attachment: scroll;
        position: relative;
        min-height: 100vh;
    }

    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(45, 85, 155, 0.85);
        z-index: 1;
    }

    .login-section {
        order: 1;
        min-height: 100vh;
        padding: 35px;
        background: transparent;
        flex: none;
        width: 100%;
        position: relative;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero-section {
        display: none;
    }

    .login-container {
        max-width: 480px;
        width: 100%;
        padding: 45px 40px 35px 40px;
        transform: translateY(0);
        margin: 0;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        border-radius: 12px;
    }

    .login-container::before,
    .login-container::after {
        display: none;
    }

    .logo {
        max-width: 250px;
    }

    .form-input {
        padding: 16px 14px;
        font-size: 16px;
    }

    .login-btn {
        padding: 16px;
        font-size: 15px;
    }
}

/* Loading animation */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading .login-btn {
    background: #ccc;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading .login-btn::after {
    content: 'Logging in...';
    animation: pulse 1.5s infinite;
}

/* Focus improvements for accessibility */
.form-input:focus,
.login-btn:focus,
.forgot-password a:focus,
.signup-link a:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .login-container {
        background: #fff;
        border: 2px solid #000;
    }

    .form-input {
        border-color: #000;
    }

    .login-btn {
        background: #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}