/* =======================================================
   0. STILURI GLOBALE ȘI FONTURI (EB Garamond)
   ======================================================= */

   @font-face {
    font-family: 'AlgerianC'; /* Nume unic pentru a evita conflictele */
    src: url('fonts/Algerian Regular.ttf') format('truetype');         
    font-weight: normal;
    font-style: normal;
}
   body {
    /* Setarea globală a fontului clasic */
    font-family: 'EB Garamond', serif; 
    color: #333;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
    line-height: 1.4;
}

.page-container {
    max-width: 850px; /* Lățimea ideală pentru afiș */
    margin: 0 auto;
    padding: 30px;
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* =======================================================
   1. STILURI PENTRU LOGO ȘI ANTET
   ======================================================= */

.header-info-container {
    display: flex; 
    align-items: center; 
    /* Am schimbat la space-around/evenly pentru ca textul sa nu fie forțat doar la dreapta */
    justify-content: space-evenly; 
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ccc;
}

.logo-col {
    width: 10%; 
    text-align: left;
}

.logo {
    max-width: 99px; /* Dimensiunea stemei */
    height: auto;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3); /* Umbră subtilă pentru evidențiere */
}

.header-info {
    text-align: center;
    width: 80%; 
    margin: 0;
    border-bottom: none; /* Eliminăm bordura duplicată */
}

.archiepiscopia {
    font-size: 1.9em;
    margin: 0;
    font-weight: bold;
    color: #e90202de; /* Roșu închis */
    font-weight: 600; /* Greutate medie/bold pentru impact */
    font-family: 'Times New Roman', serif; /* Font serif clasic pentru titlu oficial */
}

.parohia {
    font-size: 1.3em;
    margin: 5px 0 0 0;
    font-weight: bold;
    color: #e90202de;
    font-family: 'Times New Roman', serif; /* Font serif clasic pentru subtitlu */
}

h1 {
    font-family: 'AlgerianC', sans-serif;
    text-align: center;
    font-size: 2.3em;
    color: #e90202cc;
    margin: 20px 0;
    text-decoration: underline;
}

/* =======================================================
   2. STILURI TABEL ȘI PROGRAM
   ======================================================= */

.tabel-program {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 1.1em;
}

.tabel-program thead th {
    background-color: #eee;
    color: #333;
    font-weight: bold;
    text-align: center;
    padding: 10px 5px;
    border: 2px solid #aaa;
}

.tabel-program tbody td {
    padding: 8px 5px;
    border: 1px solid #ccc;
    vertical-align: center;
}

/* Stiluri pentru coloane */
.col-ziua { width: 15%; text-align: center; font-weight: bold; }
.col-data { width: 15%; text-align: center; font-weight: bold;}
.col-ora { width: 10%; text-align: center; font-weight: bold; }
.col-eveniment { width: 60%; text-align: left; font-weight: bold;}

/* Merge celulele Ziua și Data când sunt rânduri multiple */
.tabel-program tbody tr.subsequent-day-row .col-ziua,
.tabel-program tbody tr.subsequent-day-row .col-data {
    border-top: none;
    color: transparent;
    text-shadow: none;
}

.tabel-program tbody tr:not(.subsequent-day-row) .col-ziua,
.tabel-program tbody tr:not(.subsequent-day-row) .col-data {
    border-bottom: none;
}

/* Stiluri speciale */
.duminică {
    background-color: #fff0f0; /* Fundal roșiatic deschis */
    font-weight: bold;
}

.sarbatoare-speciala {
    background-color: #f7f7e0; /* Galben pal (atenție) */
    font-weight: bold;
}
/* Noua culoare pentru Evenimentele din Teren */
.darkblue {
    color: #1f456e !important; /* Un albastru închis, sobru */
    font-weight: bold;
}
/* Subsol */
.footer-info {
    margin-top: 30px;
    padding-top: 10px;
    border-top: 2px solid #ccc;
    text-align: right;
    font-style: italic;
    font-size: 0.9em;
}


/* =======================================================
   3. STILURI PENTRU CULOAREA TEXTULUI (LITURGIC)
   ======================================================= */

.rosu {
    color: #cc0000 !important; /* !important asigură că suprascrie orice altă culoare */
    font-weight: bold;
}

.mov {
    color: #660066 !important;
}

.negru {
    color: #020202 !important;
}

.darkblue {             /* Noua culoare pentru Evenimentele din Teren */
    color: #004d99 !important; /* Un albastru închis, sobru */
    font-weight: bold;
}

/* =======================================================
   4. STILURI PENTRU TIPĂRIRE (@media print)
   ======================================================= */
@media print {
    
    @page {
        size: A4 portrait;
        margin: 1.5cm;
    }

    /* Resetează culorile de fundal și fontul pentru print */
    body {
        margin: 0;
        padding: 0;
        background-color: white !important;
        color: black !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact; /* Proprietatea standard pentru compatibilitate */
        font-family: 'EB Garamond', serif !important; /* Fontul clasic */
        font-size: 10pt;
    }

    .page-container {
        max-width: none;
        box-shadow: none;
        padding: 0;
        margin: 0;
    }
    
    /* Ascunde meniul de selecție la tipărire */
    .selection-form {
        display: none; 
    }
    
    .logo {
        max-width: 80px !important;
        height: auto;
    }

    h1, h2 {
        color: #e90202 !important; /* Păstrează culoarea roșie pentru titluri */
        page-break-after: avoid;
    }

    /* Stilul tabelului pentru print */
    .tabel-program {
        width: 100%;
        border-collapse: collapse;
        font-size: 11pt;
        border: 2px solid black; /* Bordură exterioară mai groasă */
    }

    .tabel-program thead th,
    .tabel-program tbody td {
        border-color: black;
        border-style: solid;
        border-width: 1px;
    }

    /* Asigură că ultima coloană are bordură dreaptă vizibilă */
    .tabel-program thead th:last-child,
    .tabel-program tbody td:last-child {
        border-right: 1px solid black !important;
    }
    
    tr {
        page-break-inside: avoid;
    }

    /* Culori text la print */
    .rosu {
        color: #cc0000 !important; /* Păstrează culoarea roșie originală */
        font-weight: bold !important;
    }
    .mov {
        color: #660066 !important; /* Păstrează culoarea mov originală */
    }
    .negru {
        color: black !important;
    }
    .darkblue {
        color: #004d99 !important; /* Păstrează culoarea albastră */
        font-weight: bold !important;
    }

    /* Fundaluri la print */
    .duminică {
        background-color: #fff0f0 !important; /* Roșiatic deschis pentru duminici */
    }
    .sarbatoare-speciala {
        background-color: #f7f7e0 !important; /* Galben pal pentru sărbători speciale */
    }
}
/* =======================================================
   5. STILURI PENTRU ADMINISTRARE
   ======================================================= */

/* Stilul linkului de editare (pentru afișare pe ecran) */
.edit-link {
    font-size: 0.7em;
    margin-left: 10px;
    color: #007bff; /* Albastru deschis */
    text-decoration: none;
    font-weight: normal;
}

/* Extinderea regulii de print pentru a ascunde linkul [Editare] */
@media print {
    
    /* ... restul regulilor de print ... */

    /* NOU: Ascunde linkul [Editare] */
    .edit-link {
        display: none !important;
    }
    
    /* Ne asigurăm că și linkul de administrare din selection-form este ascuns */
    .selection-form a {
        display: none !important;
    }
}