/**
 * Frontend Styles
 * DepEd Cavite Landing Page Plugin
 */

/* Variables - DepEd Cavite Colors */
:root {
    --dclp-primary: #003f87; /* DepEd Blue */
    --dclp-secondary: #dc143c; /* DepEd Red */
    --dclp-gold: #ffd700;
    --dclp-text: #333333;
    --dclp-text-light: #666666;
    --dclp-border: #e0e0e0;
    --dclp-bg-light: #f8f9fa;
    --dclp-white: #ffffff;
    --dclp-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --dclp-shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* Container */
.dclp-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Landing Page Wrapper */
.dclp-landing-page {
    width: 100%;
    overflow: visible;
    /* Counter the theme's empty content offset above the shortcode. */
    margin-top: -50px;
}

/* Buttons */
.dclp-btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
}

.dclp-btn-primary {
    background: var(--dclp-secondary);
    color: var(--dclp-white);
    box-shadow: 0 3px 10px rgba(220, 20, 60, 0.3);
}

.dclp-btn-primary:hover {
    background: #b01030;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 20, 60, 0.4);
}

.dclp-btn-secondary {
    background: var(--dclp-primary);
    color: var(--dclp-white);
}

.dclp-btn-secondary:hover {
    background: #002f65;
    transform: translateY(-2px);
}

/* Sections */
.dclp-sections {
    padding: 80px 0;
    background: var(--dclp-bg-light);
}

.dclp-sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.dclp-section-card {
    background: var(--dclp-white);
    border-radius: 10px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--dclp-shadow);
    transition: all 0.3s ease;
    border-top: 4px solid var(--dclp-primary);
}

.dclp-section-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--dclp-shadow-hover);
}

.dclp-section-icon {
    font-size: 3.5rem;
    color: var(--dclp-primary);
    margin-bottom: 20px;
}

.dclp-section-icon svg {
    width: 1em;
    height: 1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: inline-block;
    animation: iconFloat 3s ease-in-out infinite;
}

.dclp-section-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 20px;
}

.dclp-section-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.dclp-section-card:hover .dclp-section-image img {
    transform: scale(1.1);
}

.dclp-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dclp-primary);
    margin: 0 0 15px 0;
}

.dclp-section-text {
    font-size: 1rem;
    color: var(--dclp-text-light);
    line-height: 1.6;
    margin-bottom: 20px;
}

.dclp-section-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--dclp-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.dclp-section-link:hover {
    color: #b01030;
    gap: 10px;
}

.dclp-arrow {
    transition: transform 0.3s ease;
}

.dclp-section-link:hover .dclp-arrow {
    transform: translateX(5px);
}

/* Section Type Specific Styles */
.dclp-section-welcome {
    border-top-color: var(--dclp-primary);
}

.dclp-section-service {
    border-top-color: var(--dclp-secondary);
}

.dclp-section-mission {
    border-top-color: var(--dclp-gold);
}

.dclp-section-vision {
    border-top-color: #28a745;
}

.dclp-section-quicklinks {
    border-top-color: #6c757d;
}

.dclp-section-custom {
    border-top-color: #17a2b8;
}

/* Quick Links List Styling */
.quick-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.quick-links-list li {
    margin-bottom: 12px;
}

.quick-links-list a {
    color: var(--dclp-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
    background: var(--dclp-bg-light);
}

.quick-links-list a:hover {
    background: var(--dclp-primary);
    color: var(--dclp-white);
    transform: translateX(5px);
}

.quick-links-list a i {
    color: var(--dclp-primary);
    transition: color 0.3s ease;
}

.quick-links-list a:hover i {
    color: var(--dclp-white);
}

/* Announcements */
.dclp-announcements {
    padding: 80px 0;
    background: var(--dclp-white);
}

.dclp-announcements-header {
    text-align: center;
    margin-bottom: 50px;
}

.dclp-section-heading {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dclp-primary);
    margin: 0 0 15px 0;
}

.dclp-section-subheading {
    font-size: 1.1rem;
    color: var(--dclp-text-light);
    margin: 0;
}

.dclp-announcements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.dclp-announcement-card {
    background: var(--dclp-white);
    border: 1px solid var(--dclp-border);
    border-radius: 10px;
    padding: 30px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dclp-announcement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--dclp-primary);
    transition: width 0.3s ease;
}

.dclp-announcement-card:hover {
    box-shadow: var(--dclp-shadow-hover);
    transform: translateY(-3px);
}

.dclp-announcement-card:hover::before {
    width: 8px;
}

.dclp-announcement-card.dclp-featured {
    border: 2px solid var(--dclp-gold);
    background: linear-gradient(135deg, #fffef0 0%, #ffffff 100%);
}

.dclp-featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--dclp-gold);
    color: #333;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.dclp-announcement-category {
    display: inline-block;
    background: var(--dclp-primary);
    color: var(--dclp-white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.dclp-announcement-date {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--dclp-text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.dclp-announcement-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--dclp-text);
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.dclp-announcement-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.dclp-announcement-title a:hover {
    color: var(--dclp-primary);
}

.dclp-announcement-excerpt {
    font-size: 1rem;
    color: var(--dclp-text-light);
    line-height: 1.6;
    margin-bottom: 20px;
}

.dclp-announcement-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--dclp-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.dclp-announcement-link:hover {
    color: #b01030;
    gap: 10px;
}

/* Official links */
.dclp-official-links {
    padding: 55px 0;
    background: var(--dclp-bg-light);
    border-top: 1px solid var(--dclp-border);
}

.dclp-official-links-title {
    margin: 0 0 32px;
    color: var(--dclp-primary);
    font-size: 1.75rem;
    text-align: center;
}

.dclp-official-links-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    gap: 28px;
    align-items: start;
}

.dclp-official-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 18px;
    border-radius: 12px;
    color: var(--dclp-primary);
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.dclp-official-link img {
    display: block;
    width: 150px;
    height: 150px;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.dclp-official-link:hover,
.dclp-official-link:focus-visible {
    background: var(--dclp-white);
    box-shadow: var(--dclp-shadow-hover);
    color: var(--dclp-secondary);
    outline: none;
    transform: translateY(-7px);
}

.dclp-official-link:hover img,
.dclp-official-link:focus-visible img {
    transform: scale(1.08) rotate(2deg);
}

.dclp-official-link:focus-visible {
    box-shadow: 0 0 0 3px rgba(0, 63, 135, 0.35), var(--dclp-shadow-hover);
}

/* Icon Float Animation */
@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .dclp-container {
        max-width: 960px;
    }
}

@media (max-width: 992px) {
    .dclp-container {
        max-width: 720px;
    }
    
    .dclp-sections,
    .dclp-announcements {
        padding: 60px 0;
    }
    
    .dclp-section-heading {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .dclp-container {
        max-width: 540px;
    }
    
    .dclp-sections-grid {
        grid-template-columns: 1fr;
    }
    
    .dclp-announcements-grid {
        grid-template-columns: 1fr;
    }

    .dclp-official-links-grid {
        grid-template-columns: repeat(2, minmax(130px, 1fr));
    }
    
    .dclp-sections,
    .dclp-announcements {
        padding: 50px 0;
    }
    
    .dclp-section-heading {
        font-size: 1.75rem;
    }
}

@media (max-width: 576px) {
    .dclp-landing-page {
        margin-top: -25px;
    }

    .dclp-container {
        padding: 0 15px;
    }
    
    .dclp-section-card {
        padding: 30px 20px;
    }
    
    .dclp-announcement-card {
        padding: 20px;
    }

    .dclp-official-links {
        padding: 40px 0;
    }

    .dclp-official-links-grid {
        gap: 12px;
    }

    .dclp-official-link {
        padding: 12px 6px;
        font-size: 0.85rem;
    }

    .dclp-official-link img {
        width: 110px;
        height: 110px;
    }
    
    .dclp-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}
