/* ------------------------------------------------------------------- */
/* === Common Utilities (Assuming not in style.css) === */
/* ------------------------------------------------------------------- */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

.card-modern {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    transition: box-shadow 0.3s ease, transform 0.2s ease; /* Enhanced transition */
}

/* For the submit button in the form */
.btn-primary-modern {
    display: inline-flex;
    align-items: center;
    padding: 14px 30px; /* Larger padding for better touch targets */
    background-color: #075e54; /* Professional Green/Teal */
    color: #fff;
    text-decoration: none;
    border-radius: 50px; /* Pill shape for a modern look */
    font-weight: 600;
    font-size: 1.05rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(7, 94, 84, 0.2);
}

.btn-primary-modern:hover {
    background-color: #054a43;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(7, 94, 84, 0.3);
}

.icon-left {
    margin-right: 8px;
}

/* ------------------------------------------------------------------- */
/* === Top Header & Action Buttons (The Button in Question) === */
/* ------------------------------------------------------------------- */

.page-header-top {
    margin-bottom: 2rem;
    display: flex;
    justify-content: flex-start; /* Ensures the back button is flush left */
    padding-top: 1rem; /* Added padding to space it from the top edge */
}

/* This is the key style for the back button */
.btn-green {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background-color: #28a745;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    box-shadow: 0 4px 6px rgba(40, 167, 69, 0.2); /* Added a slight shadow for depth */
}

.btn-green:hover {
    background-color: #218838;
}

/* Action Button (Add Tution) */
.action-buttons {
    text-align: center;
    margin-bottom: 3rem;
}

/* ------------------------------------------------------------------- */
/* === Filter Section - Structured and clean === */
/* ------------------------------------------------------------------- */

.tution-filter-section {
    padding: 2rem;
    margin-bottom: 3rem;
    border: none;
    background-color: #f7fcf7; /* Light background to define the search panel */
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08); 
}

.tution-filter-form {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 1.5rem;
    align-items: flex-end; 
}

.filter-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 1rem;
}

.filter-group i {
    color: #075e54;
    margin-right: 5px;
}

.tution-filter-form select {
    width: 100%;
    padding: 12px; /* Taller inputs */
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background-color: #fff;
    appearance: none; 
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23555'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd' /%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 1em;
    transition: border-color 0.3s;
}

.tution-filter-form select:focus {
    border-color: #28a745;
    outline: none;
}

.filter-submit {
    display: flex;
    gap: 10px;
    padding-top: 0; 
}

.btn-filter-apply {
    flex-grow: 1;
    padding: 12px 15px;
    background-color: #28a745; /* Bright green for action */
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-filter-apply:hover {
    background-color: #218838;
}

.btn-filter-clear {
    flex-grow: 1;
    padding: 12px 15px;
    background-color: #f0f0f0; /* Soft gray */
    color: #555;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s;
}

.btn-filter-clear:hover {
    background-color: #e0e0e0;
}

/* Responsive Filter Layout */
@media (max-width: 992px) {
    .tution-filter-form {
        grid-template-columns: 1fr 1fr;
    }
    .filter-submit {
        grid-column: 1 / -1; 
    }
}

@media (max-width: 576px) {
    .tution-filter-form {
        grid-template-columns: 1fr;
    }
}

/* ------------------------------------------------------------------- */
/* === Tution List and Card Styles - Elegant Display === */
/* ------------------------------------------------------------------- */

.tution-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); /* Wider cards */
    gap: 2.5rem; /* Increased gap */
    margin-top: 2rem;
}

.tution-card {
    display: flex;
    flex-direction: column;
    border-left: 6px solid #075e54; /* Main color highlight */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); /* Lighter initial shadow */
    border-radius: 12px;
    overflow: hidden; /* Ensures shadow/border look clean */
}

.tution-card:hover {
    transform: translateY(-8px); /* Deeper lift on hover */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.card-content {
    flex-grow: 1;
    padding-bottom: 1.5rem;
}

.teacher-name {
    font-size: 1.9rem;
    color: #054a43;
    margin-top: 0;
    margin-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0; /* Cleaner separator */
    padding-bottom: 0.75rem;
    font-weight: 700;
}

.tution-info {
    font-size: 1.05rem;
    color: #333;
    margin: 0.6rem 0;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
}

.tution-info i {
    color: #28a745;
    font-size: 1.1em;
    width: 20px;
    margin-right: 10px;
    padding-top: 2px;
}

.tution-info .label {
    font-weight: 600;
    color: #555;
    margin-right: 5px;
    min-width: 60px;
}

.tution-description {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
    color: #666;
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Card Actions (Call/Delete Buttons) */
.card-actions {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 15px;
}

.btn-call {
    flex-grow: 1;
    padding: 14px 15px;
    background-color: #28a745; /* Primary Call to Action Green */
    color: #fff;
    text-align: center;
    border-radius: 50px; /* Pill shape */
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.2s;
    white-space: nowrap;
    box-shadow: 0 3px 6px rgba(40, 167, 69, 0.3);
}

.btn-call:hover {
    background-color: #218838;
    transform: translateY(-1px);
}

.btn-delete {
    padding: 14px 15px;
    background-color: #dc3545; /* Standard Red for Delete/Warning */
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    box-shadow: 0 3px 6px rgba(220, 53, 69, 0.3);
}

.btn-delete:hover {
    background-color: #c82333;
}

/* Alert Messages */
.error-message, .empty-state-message {
    text-align: center;
    padding: 2.5rem;
    margin: 2rem auto;
    max-width: 700px;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.6;
}

.error-message {
    background-color: #fff3f5; /* Lighter red tint */
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.empty-state-message {
    background-color: #f8fbf8; /* Lighter green tint */
    border: 1px solid #ddd;
    color: #555;
}

/* Styles specific to the add_tution form itself */
.add-tution-form-section {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
}

.add-tution-form .form-group {
    margin-bottom: 1.5rem;
}

.add-tution-form label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #075e54;
}

.add-tution-form input[type="text"],
.add-tution-form input[type="tel"],
.add-tution-form textarea,
.add-tution-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.add-tution-form input:focus,
.add-tution-form textarea:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
    outline: none;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.5rem;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    background-color: #fcfcfc;
}

.checkbox-group label {
    font-weight: 500;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #aaa;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"]:checked {
    background-color: #28a745;
    border-color: #28a745;
}

.checkbox-group input[type="checkbox"]:checked::before {
    content: '\f00c'; /* Checkmark icon from Font Awesome */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 12px;
    color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Responsive adjustments for the form */
@media (max-width: 600px) {
    .checkbox-group {
        flex-direction: column;
    }
}
