/* ===================================
   AFT PEDIATRICA MAGLIE - STYLES
   =================================== */

/* === RESET E BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lora', Georgia, serif;
    background: #faf9f5;
    color: #141413;
    line-height: 1.6;
}

/* === PAGINA LOGIN === */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(20, 20, 19, 0.08);
    padding: 48px;
    max-width: 440px;
    width: 100%;
    text-align: center;
}

.login-logo {
    font-size: 64px;
    margin-bottom: 24px;
}

.login-logo img {
    width: 220px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.login-title {
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 28px;
    font-weight: 600;
    color: #141413;
    margin-bottom: 12px;
}

.login-subtitle {
    font-size: 16px;
    color: #b0aea5;
    margin-bottom: 32px;
}

.login-form {
    text-align: left;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #141413;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    font-family: 'Lora', Georgia, serif;
    font-size: 16px;
    border: 1px solid #e8e6dc;
    border-radius: 8px;
    background: #faf9f5;
    color: #141413;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #d97757;
    background: white;
    box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.1);
}

.form-button {
    width: 100%;
    padding: 14px;
    margin-top: 24px;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: #d97757;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-button:hover {
    background: #c96847;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(217, 119, 87, 0.3);
}

.form-button:active {
    transform: translateY(0);
}

.error-message {
    color: #d97757;
    font-size: 14px;
    margin-top: 12px;
    display: none;
}

.error-message.show {
    display: block;
}

/* === CONTENUTO PRINCIPALE === */
.main-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.main-content.show {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === NAVBAR === */
.navbar {
    background: white;
    border-bottom: 1px solid #e8e6dc;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(20, 20, 19, 0.04);
}

.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #141413;
    transition: opacity 0.2s ease;
}

.navbar-logo:hover {
    opacity: 0.8;
}

.navbar-icon {
    font-size: 32px;
}

.navbar-logo-img {
    height: 100px;
    width: auto;
    display: block;
    object-fit: contain;
    align-self: center;
    transform: translateY(3px);
}

.navbar-title {
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #141413;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-link {
    padding: 10px 16px;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #141413;
    background: transparent;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.navbar-link:hover {
    background: #faf9f5;
    color: #d97757;
}

.navbar-link.active {
    background: #d97757;
    color: white;
}

.logout-button {
    padding: 10px 20px;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #141413;
    background: #faf9f5;
    border: 1px solid #e8e6dc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.logout-button:hover {
    background: white;
    border-color: #d97757;
    color: #d97757;
}

/* Mobile menu toggle */
.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.navbar-toggle span {
    width: 24px;
    height: 3px;
    background: #141413;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* === CONTAINER === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 32px;
}

/* === HERO SECTION === */
.hero {
    background: linear-gradient(135deg, #d97757 0%, #6a9bcc 100%);
    border-radius: 16px;
    padding: 48px;
    margin-bottom: 48px;
    text-align: center;
    color: white;
}

.hero-title {
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: 0 2px 8px rgba(20, 20, 19, 0.1);
}

.hero-description {
    font-size: 18px;
    opacity: 0.95;
}

/* === SECTION === */
.section {
    background: white;
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 32px;
    box-shadow: 0 2px 16px rgba(20, 20, 19, 0.06);
}

.section-title {
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 28px;
    font-weight: 600;
    color: #141413;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e8e6dc;
}

/* === INTRO SECTION === */
.intro-section {
    background: white;
    border-radius: 16px;
    padding: 32px 40px;
    margin-bottom: 32px;
    box-shadow: 0 2px 16px rgba(20, 20, 19, 0.06);
    border-left: 4px solid #d97757;
}

.intro-text {
    font-size: 17px;
    line-height: 1.8;
    color: #141413;
    text-align: left;
}

/* === CARDS === */
.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
}

.card {
    display: flex;
    flex-direction: column;
    background: white;
    padding: 32px;
    border-radius: 16px;
    border: 2px solid #e8e6dc;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(20, 20, 19, 0.12);
    border-color: #d97757;
}

.card-icon {
    font-size: 56px;
    margin-bottom: 20px;
}

.card-title {
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: #141413;
    margin-bottom: 12px;
}

.card-description {
    font-size: 15px;
    color: #b0aea5;
    line-height: 1.6;
    flex-grow: 1;
}

.card-arrow {
    font-size: 28px;
    color: #d97757;
    margin-top: 16px;
    transition: transform 0.3s ease;
}

.card:hover .card-arrow {
    transform: translateX(8px);
}

/* === WEBAPP CARDS === */
.webapp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.webapp-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #faf9f5;
    padding: 24px;
    border-radius: 12px;
    border: 2px solid #e8e6dc;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.webapp-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(20, 20, 19, 0.12);
    border-color: #d97757;
    background: white;
}

.webapp-icon {
    font-size: 40px;
    flex-shrink: 0;
}

.webapp-content {
    flex: 1;
}

.webapp-title {
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #141413;
    margin-bottom: 6px;
}

.webapp-description {
    font-size: 14px;
    color: #b0aea5;
    line-height: 1.5;
}

.webapp-arrow {
    font-size: 24px;
    color: #d97757;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.webapp-card:hover .webapp-arrow {
    transform: translateX(4px);
}

/* === TABELLA ORARI RESPONSIVE === */
.schedule-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.schedule-table thead {
    background: #faf9f5;
}

.schedule-table th {
    font-family: 'Poppins', Arial, sans-serif;
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #141413;
    border-bottom: 2px solid #e8e6dc;
}

.schedule-table tbody tr {
    border-bottom: 1px solid #e8e6dc;
    transition: background-color 0.2s ease;
}

.schedule-table tbody tr:hover {
    background-color: #faf9f5;
}

.schedule-table tbody tr:last-child {
    border-bottom: none;
}

.schedule-table td {
    padding: 20px 12px;
    font-size: 15px;
    vertical-align: top;
}

.schedule-table td:first-child {
    font-weight: 600;
    color: #d97757;
    font-family: 'Poppins', Arial, sans-serif;
}

.time-slot {
    display: block;
    margin: 4px 0;
    color: #141413;
}

.time-slot-group {
    display: block;
    margin-bottom: 6px;
    margin-top: 8px;
}

.location {
    color: #788c5d;
    font-style: italic;
    font-size: 13px;
    display: block;
    margin-top: 4px;
}

/* Mobile schedule view */
@media (max-width: 768px) {
    .schedule-table {
        min-width: 100%;
    }

    .schedule-table thead {
        display: none;
    }

    .schedule-table tbody tr {
        display: block;
        margin-bottom: 24px;
        border: 2px solid #e8e6dc;
        border-radius: 12px;
        padding: 20px;
        background: #faf9f5;
    }

    .schedule-table tbody tr:hover {
        background: white;
        box-shadow: 0 4px 12px rgba(20, 20, 19, 0.08);
    }

    .schedule-table td {
        display: block;
        padding: 8px 0;
        border: none;
    }

    .schedule-table td:first-child {
        font-size: 20px;
        margin-bottom: 16px;
        padding-bottom: 12px;
        border-bottom: 2px solid #e8e6dc;
    }

    .schedule-table td:not(:first-child):before {
        content: attr(data-label);
        font-family: 'Poppins', Arial, sans-serif;
        font-weight: 600;
        font-size: 13px;
        text-transform: uppercase;
        color: #788c5d;
        display: block;
        margin-bottom: 6px;
    }
}

/* === CONTATTI === */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.contact-card {
    background: #faf9f5;
    padding: 24px;
    border-radius: 12px;
    border-left: 4px solid #6a9bcc;
    transition: all 0.2s ease;
}

.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(20, 20, 19, 0.08);
    border-left-color: #d97757;
}

.doctor-name {
    font-family: 'Poppins', Arial, sans-serif;
    font-weight: 600;
    color: #d97757;
    font-size: 18px;
    margin-bottom: 12px;
}

.contact-details {
    color: #141413;
    font-size: 15px;
    line-height: 1.8;
}

.contact-detail-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
}

.icon {
    color: #788c5d;
    margin-right: 10px;
    flex-shrink: 0;
}

.contact-link {
    color: #141413;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-link:hover {
    color: #d97757;
    text-decoration: underline;
}

/* === LINK CARDS === */
.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.link-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #faf9f5;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e8e6dc;
    text-decoration: none;
    transition: all 0.3s ease;
}

.link-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(20, 20, 19, 0.12);
    border-color: #6a9bcc;
    background: white;
}

.link-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.link-content {
    flex: 1;
}

.link-title {
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #141413;
    margin-bottom: 4px;
}

.link-description {
    font-size: 13px;
    color: #b0aea5;
    line-height: 1.4;
}

.link-external {
    font-size: 20px;
    color: #6a9bcc;
    flex-shrink: 0;
}

/* === FOOTER === */
.footer {
    text-align: center;
    padding: 32px;
    color: #b0aea5;
    font-size: 14px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .navbar-inner {
        padding: 0 20px;
        height: 64px;
    }

    .navbar-title {
        font-size: 16px;
    }

    .navbar-icon {
        font-size: 28px;
    }

    .navbar-logo-img {
        height: 80px;
    }

    .navbar-menu {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        gap: 0;
        padding: 16px;
        border-bottom: 1px solid #e8e6dc;
        box-shadow: 0 4px 12px rgba(20, 20, 19, 0.08);
        display: none;
    }

    .navbar-menu.active {
        display: flex;
    }

    .navbar-link {
        width: 100%;
        text-align: center;
        padding: 12px;
    }

    .logout-button {
        width: 100%;
        margin-left: 0;
        margin-top: 8px;
    }

    .navbar-toggle {
        display: flex;
    }

    .navbar-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translateY(10px);
    }

    .navbar-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .navbar-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translateY(-10px);
    }

    .container {
        padding: 32px 20px;
    }

    .hero {
        padding: 32px 24px;
    }

    .hero-title {
        font-size: 28px;
    }

    .section {
        padding: 24px;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .webapp-grid {
        grid-template-columns: 1fr;
    }

    .webapp-card {
        padding: 20px;
    }

    .webapp-icon {
        font-size: 32px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .link-grid {
        grid-template-columns: 1fr;
    }

    .login-box {
        padding: 32px 24px;
    }
}

@media print {
    body {
        background: white;
    }

    .navbar,
    .logout-button,
    .hero {
        display: none;
    }

    .section {
        box-shadow: none;
        page-break-inside: avoid;
    }
}
