/**
 * Public/Frontend Styles
 *
 * @package Courses_Colleges_Listing
 */

/* Courses List */
.ccl-courses-list {
    display: grid;
    gap: 30px;
    margin: 30px 0;
}

.ccl-course-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.ccl-course-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ccl-course-thumbnail {
    width: 100%;
    overflow: hidden;
}

.ccl-course-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.ccl-course-thumbnail:hover img {
    transform: scale(1.05);
}

.ccl-course-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ccl-course-title {
    margin: 0 0 15px;
    font-size: 24px;
    line-height: 1.3;
}

.ccl-course-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.ccl-course-title a:hover {
    color: #0073aa;
}

.ccl-course-categories {
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.ccl-course-categories .ccl-label {
    font-weight: 600;
    color: #333;
    margin-right: 5px;
}

.ccl-course-colleges {
    margin-bottom: 12px;
    font-size: 14px;
    color: #666;
}

.ccl-course-colleges .ccl-label {
    font-weight: 600;
    color: #333;
    margin-right: 5px;
}

.ccl-course-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.ccl-course-duration,
.ccl-course-fee {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.ccl-course-duration .ccl-icon,
.ccl-course-fee .ccl-icon {
    font-size: 16px;
    color: #0073aa;
}

.ccl-course-duration .ccl-label,
.ccl-course-fee .ccl-label {
    font-weight: 600;
    color: #333;
}

.ccl-course-duration .ccl-value,
.ccl-course-fee .ccl-value {
    color: #555;
}

.ccl-course-status {
    margin-bottom: 15px;
}

.ccl-course-excerpt {
    margin-bottom: 20px;
    color: #555;
    line-height: 1.6;
    flex: 1;
}

.ccl-course-link {
    margin-top: auto;
}

.ccl-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.ccl-button:hover {
    background-color: #005177;
    color: #fff;
}

/* Admission Status Badge */
.ccl-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ccl-badge-open {
    color: #0a6e0a;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.ccl-badge-closed {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

/* Colleges List */
.ccl-colleges-list {
    display: grid;
    gap: 30px;
    margin: 30px 0;
}

.ccl-college-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.ccl-college-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ccl-college-thumbnail {
    width: 100%;
    overflow: hidden;
}

.ccl-college-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.ccl-college-thumbnail:hover img {
    transform: scale(1.05);
}

.ccl-college-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ccl-college-name {
    margin: 0 0 15px;
    font-size: 24px;
    line-height: 1.3;
}

.ccl-college-name a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.ccl-college-name a:hover {
    color: #0073aa;
}

.ccl-college-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.ccl-college-city,
.ccl-college-phone,
.ccl-college-email {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.ccl-college-meta .ccl-icon {
    font-size: 16px;
}

.ccl-college-meta .ccl-value {
    color: #555;
}

.ccl-college-email a {
    color: #0073aa;
    text-decoration: none;
}

.ccl-college-email a:hover {
    text-decoration: underline;
}

.ccl-college-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 15px;
    font-size: 14px;
    padding: 10px;
    background: #fff9e6;
    border-left: 3px solid #ffb900;
}

.ccl-college-info strong {
    color: #333;
}

.ccl-college-count {
    color: #666;
    font-size: 16px;
    margin-bottom: 15px;
    padding: 10px;
    background: #e7f3ff;
    border-radius: 4px;
    text-align: center;
}

.ccl-college-count strong {
    color: #0073aa;
    font-size: 24px;
}

.ccl-college-excerpt {
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.ccl-college-link {
    margin-top: auto;
}

@media (min-width: 768px) {
    .ccl-college-item {
        flex-direction: row;
    }

    .ccl-college-thumbnail {
        width: 300px;
        flex-shrink: 0;
    }
}

/* Course Categories List */
.ccl-categories-list {
    display: grid;
    gap: 25px;
    margin: 30px 0;
}

.ccl-category-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.ccl-category-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ccl-category-name {
    margin: 0 0 10px;
    font-size: 22px;
    line-height: 1.3;
}

.ccl-category-name a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.ccl-category-name a:hover {
    color: #0073aa;
}

.ccl-category-count {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    font-weight: 500;
}

.ccl-category-description {
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.ccl-category-link {
    margin-top: 15px;
}

/* No Results Messages */
.ccl-no-courses,
.ccl-no-colleges,
.ccl-no-categories {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
    font-style: italic;
    background: #f9f9f9;
    border-radius: 8px;
    margin: 30px 0;
}

/* Responsive Design */
@media (min-width: 768px) {
    .ccl-course-item {
        flex-direction: row;
    }

    .ccl-course-thumbnail {
        width: 300px;
        flex-shrink: 0;
    }

    .ccl-colleges-list,
    .ccl-categories-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .ccl-colleges-list,
    .ccl-categories-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Single Course & College Archive Pages */
.single-course .entry-content,
.tax-college .entry-content {
    max-width: 100%;
}

/* Accessibility */
.ccl-button:focus,
.ccl-course-title a:focus,
.ccl-college-name a:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Inquiry Modal */
.ccl-inquiry-modal {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 999999 !important;
    overflow-y: auto !important;
}

.ccl-inquiry-modal[style*="display: block"],
.ccl-inquiry-modal[style*="display:block"] {
    display: block !important;
}

.ccl-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.ccl-modal-wrapper {
    position: relative;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 2;
}

.ccl-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: ccl-modal-slide-in 0.3s ease-out;
}

@keyframes ccl-modal-slide-in {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ccl-modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #0073aa 0%, #005177 100%);
    border-radius: 12px 12px 0 0;
}

.ccl-modal-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
}

.ccl-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 5px 12px;
    border-radius: 4px;
    transition: background 0.2s;
}

.ccl-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.ccl-modal-body {
    padding: 30px;
}

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

.ccl-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.ccl-form-group label .required {
    color: #e74c3c;
    margin-left: 3px;
}

.ccl-form-group input[type="text"],
.ccl-form-group input[type="email"],
.ccl-form-group input[type="tel"],
.ccl-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ccl-form-group input:focus,
.ccl-form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.ccl-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.ccl-form-message {
    display: none;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.ccl-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ccl-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.ccl-form-submit {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #0073aa 0%, #005177 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ccl-form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 115, 170, 0.3);
}

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

.ccl-form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Terms checkbox - used in modal */
.ccl-modal-body .form-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
}

.ccl-modal-body .form-check input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.ccl-modal-body .form-check label {
    display: inline;
    font-weight: 400 !important;
    font-size: 13px !important;
    color: #555 !important;
    margin: 0 !important;
    cursor: pointer;
    line-height: 1.5;
}

.ccl-modal-body .form-check label a {
    color: #0073aa;
    text-decoration: none;
}

.ccl-modal-body .form-check label a:hover {
    text-decoration: underline;
}

/* Phone input with flag prefix - used in both modal and course form */
.phone-input {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.phone-input .flag-code {
    padding: 10px 12px;
    background: #f5f5f5;
    border-right: 1px solid #ddd;
    font-size: 14px;
    white-space: nowrap;
    color: #333;
}

.phone-input input[type="tel"] {
    flex: 1;
    border: none !important;
    border-radius: 0 !important;
    padding: 10px 12px !important;
    outline: none;
    font-size: 15px;
    box-shadow: none !important;
}

.phone-input:focus-within {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* Prevent body scroll when modal is open */
body.ccl-modal-open {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
    .ccl-modal-header {
        padding: 20px;
    }

    .ccl-modal-title {
        font-size: 18px;
    }

    .ccl-modal-body {
        padding: 20px;
    }

    .ccl-modal-wrapper {
        padding: 15px;
    }
}
