/* 
 * RAPOR DIGITAL MADRASAH
 * Main Stylesheet
 */

/* ==================== Reset & Base ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a5d3a;
    --secondary-color: #27ae60;
    --accent-color: #2ecc71;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #1a5d3a;
    --text-color: #333;
    --text-muted: #7f8c8d;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
    --radius: 10px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a5d3a 0%, #27ae60 50%, #2ecc71 100%);
    min-height: 100vh;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ==================== Header ==================== */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo i {
    font-size: 2rem;
    color: var(--secondary-color);
}

.logo h1 {
    font-size: 1.4rem;
    color: var(--primary-color);
    font-weight: 700;
}

.btn-admin {
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-admin:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* ==================== Main Content ==================== */
.main-content {
    padding: 40px 0;
    min-height: calc(100vh - 160px);
}

/* ==================== Hero Section ==================== */
.hero {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 40px;
}

.hero-content h2 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-content p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
}

/* ==================== Promo Section ==================== */
.promo-section {
    margin-bottom: 30px;
}

.promo-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: var(--radius);
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 25px;
    box-shadow: var(--shadow-hover);
    border: 2px solid #25D366;
    position: relative;
    overflow: hidden;
}

.promo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, #25D366, #128C7E);
}

.promo-icon {
    width: 80px;
    height: 80px;
    min-width: 80px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.3);
}

.promo-content {
    flex: 1;
}

.promo-content h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.promo-content > p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 15px;
}

.promo-features {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.promo-features span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--success-color);
    font-weight: 500;
}

.promo-features span i {
    color: #25D366;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp i {
    font-size: 1.3rem;
}

@media (max-width: 768px) {
    .promo-card {
        flex-direction: column;
        text-align: center;
        padding: 25px 20px;
    }

    .promo-features {
        justify-content: center;
    }

    .promo-content h3 {
        font-size: 1.1rem;
    }
}

/* ==================== Website Grid ==================== */
.websites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    padding: 0 10px;
}

/* ==================== Grup Section ==================== */
.grup-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.grup-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--grup-color, var(--secondary-color));
}

.grup-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.grup-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.grup-title h2 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin: 0;
}

.grup-badge {
    background: var(--grup-color, var(--secondary-color));
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ==================== Small Website Grid ==================== */
.websites-grid-small {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

.website-card-small {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    border: 1px solid #eee;
    position: relative;
    min-height: 70px;
}

.website-card-small::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--card-color, var(--secondary-color));
    border-radius: 8px 0 0 8px;
}

.website-card-small:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
    border-color: var(--card-color, var(--secondary-color));
}

.card-icon-small {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.card-content-small {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.card-content-small h4 {
    font-size: 0.9rem;
    color: var(--primary-color);
    margin: 0 0 3px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
}

.card-content-small p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-arrow {
    color: var(--text-muted);
    font-size: 0.8rem;
    opacity: 0;
    transition: var(--transition);
    flex-shrink: 0;
}

.website-card-small:hover .card-arrow {
    opacity: 1;
    color: var(--card-color, var(--secondary-color));
}

/* Mobile responsive for cards */
@media (max-width: 480px) {
    .websites-grid-small {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .website-card-small {
        padding: 15px;
        min-height: auto;
    }

    .card-icon-small {
        width: 45px;
        height: 45px;
        min-width: 45px;
        font-size: 1.1rem;
    }

    .card-content-small h4 {
        font-size: 0.95rem;
        white-space: normal;
    }

    .card-content-small p {
        font-size: 0.8rem;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }

    .card-arrow {
        display: none;
    }
}

.website-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
}

.website-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--card-color, var(--secondary-color));
}

.website-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.card-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 25px auto 15px;
    transition: var(--transition);
}

.card-icon i {
    font-size: 2rem;
    color: white;
}

.website-card:hover .card-icon {
    transform: scale(1.1);
}

.card-content {
    padding: 0 25px;
    text-align: center;
    flex: 1;
}

.card-content h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.card-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.card-action {
    padding: 20px 25px;
    text-align: center;
}

.btn-visit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--card-color, var(--secondary-color));
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 500;
    transition: var(--transition);
}

.website-card:hover .btn-visit {
    background: var(--primary-color);
}

/* ==================== No Data ==================== */
.no-data {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: var(--radius);
    grid-column: 1 / -1;
}

.no-data i {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.no-data p {
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* ==================== Footer ==================== */
.footer {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

/* ==================== Buttons ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: var(--text-muted);
    color: white;
}

.btn-secondary:hover {
    background: #636e72;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-info {
    background: var(--accent-color);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
}

.btn-outline:hover {
    background: var(--secondary-color);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-group {
    display: flex;
    gap: 5px;
}

/* ==================== Alerts ==================== */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert i {
    margin-top: 2px;
}

.alert ul {
    margin: 0;
    padding-left: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* ==================== Badge ==================== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-secondary {
    background: #e2e3e5;
    color: #383d41;
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
    }

    .logo h1 {
        font-size: 1.2rem;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .websites-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .btn-admin span {
        display: none;
    }
}
