/* Rannalapsekool.ee custom styles */

/* ===== GLOBAL ===== */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #1a2a3a;
    line-height: 1.75;
}

/* ===== CONTENT WIDTH CONTROL ===== */
/* Main constraint: keep reading width comfortable */
.entry-content-wrap {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* Full-width sections get internal constraint */
.wp-block-group.alignfull > *:not(.wp-block-columns):not(.wp-block-buttons) {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

.wp-block-group.alignfull > .wp-block-columns {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

.wp-block-group.alignfull > .wp-block-buttons {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

/* Paragraphs - optimal reading width */
.entry-content p {
    max-width: 700px;
    text-align: left;
}

.entry-content .has-text-align-center {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* ===== HEADER ===== */
.site-header {
    background-color: #ffffff !important;
    border-bottom: 3px solid #1a3a5c !important;
    box-shadow: 0 2px 8px rgba(26, 58, 92, 0.08);
}

/* Logo size control */
.site-branding .custom-logo,
.custom-logo-link img {
    max-height: 55px !important;
    width: auto !important;
    height: auto !important;
    max-width: 180px !important;
}

/* Site title next to logo */
.site-branding .site-title {
    color: #1a3a5c !important;
    font-weight: 800 !important;
    font-size: 1.2rem !important;
}

.site-branding .site-description {
    display: none;
}

/* Navigation */
.main-navigation .menu > li > a,
.primary-menu-container .menu > li > a {
    color: #1a3a5c !important;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.2px;
}

.main-navigation .menu > li > a:hover,
.primary-menu-container .menu > li > a:hover {
    color: #2a6496 !important;
}

.main-navigation .menu > li.current-menu-item > a,
.primary-menu-container .menu > li.current-menu-item > a {
    color: #e8a027 !important;
    border-bottom: 2px solid #e8a027;
}

/* ===== HERO / H1 ===== */
.entry-content h1 {
    color: #1a3a5c;
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.2;
    max-width: 650px;
    margin: 0 auto 1.5rem;
    text-align: center;
}

/* ===== HEADINGS ===== */
h2.wp-block-heading {
    color: #1a3a5c;
    font-weight: 700;
    font-size: 1.7rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

h3.wp-block-heading {
    color: #1a3a5c;
    font-weight: 700;
    font-size: 1.25rem;
}

/* ===== BUTTONS ===== */
.wp-block-button__link {
    border-radius: 6px !important;
    padding: 12px 28px !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    text-transform: none !important;
    transition: all 0.3s ease;
}

.wp-block-button__link.has-luminous-vivid-orange-background-color {
    background-color: #e8a027 !important;
    color: #ffffff !important;
    border: none;
    box-shadow: 0 3px 12px rgba(232, 160, 39, 0.3);
}

.wp-block-button__link.has-luminous-vivid-orange-background-color:hover {
    background-color: #d4901e !important;
    box-shadow: 0 4px 16px rgba(232, 160, 39, 0.4);
    transform: translateY(-1px);
}

.is-style-outline .wp-block-button__link {
    border: 2px solid #1a3a5c !important;
    color: #1a3a5c !important;
    background: transparent !important;
}

.is-style-outline .wp-block-button__link:hover {
    background: #1a3a5c !important;
    color: #ffffff !important;
}

/* Outline button on dark backgrounds */
.has-background[style*="#1a3a5c"] .is-style-outline .wp-block-button__link,
.wp-block-group.has-background[style*="#1a3a5c"] .is-style-outline .wp-block-button__link {
    border-color: #ffffff !important;
    color: #ffffff !important;
}

.has-background[style*="#1a3a5c"] .is-style-outline .wp-block-button__link:hover,
.wp-block-group.has-background[style*="#1a3a5c"] .is-style-outline .wp-block-button__link:hover {
    background: #ffffff !important;
    color: #1a3a5c !important;
}

/* ===== DONATION BOX ===== */
.wp-block-group.has-background[style*="background-color:#f5f0e8"] {
    border: 1px solid #d4c5a9;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== INFO BOX - light blue ===== */
.wp-block-group.has-background[style*="background-color:#e8f0f5"] {
    border-left: 4px solid #2a6496;
    border-radius: 0 12px 12px 0;
}

/* ===== DARK CTA SECTION ===== */
.wp-block-group.has-background[style*="background-color:#1a3a5c"] {
    background: linear-gradient(135deg, #1a3a5c 0%, #0d2740 100%) !important;
}

/* ===== THREE COLUMNS ===== */
.wp-block-columns {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    gap: 1.5rem;
}

.wp-block-columns .wp-block-column {
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border-top: 4px solid #2a6496;
    transition: transform 0.2s ease;
}

.wp-block-columns .wp-block-column:nth-child(2) {
    border-top-color: #e8a027;
}

.wp-block-columns .wp-block-column:nth-child(3) {
    border-top-color: #1a3a5c;
}

.wp-block-columns .wp-block-column:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Reset paragraph max-width inside columns and boxes */
.wp-block-column p,
.wp-block-group.has-background p {
    max-width: none;
}

/* ===== LISTS ===== */
.wp-block-list li {
    padding: 4px 0;
    line-height: 1.7;
}

/* ===== TABLE ===== */
.wp-block-table table {
    border-collapse: collapse;
    width: 100%;
}

.wp-block-table thead {
    background: #1a3a5c;
    color: white;
}

.wp-block-table th {
    padding: 12px 16px;
    text-align: left;
}

.wp-block-table td {
    padding: 10px 16px;
    border-bottom: 1px solid #e0e0e0;
}

.wp-block-table tbody tr:hover {
    background: #f5f0e8;
}

/* ===== "MIDA ME KAITSEME" LIST STYLE ===== */
.kaitseme-list p {
    max-width: 700px !important;
    margin-left: auto;
    margin-right: auto;
    padding: 16px 20px 16px 24px;
    border-left: 4px solid #e8a027;
    background: #faf8f4;
    border-radius: 0 8px 8px 0;
    margin-bottom: 12px !important;
    font-size: 0.95rem;
    line-height: 1.7;
}

.kaitseme-list p strong {
    color: #1a3a5c;
    font-size: 1.05rem;
}

/* ===== SEPARATOR ===== */
.wp-block-separator {
    border-color: #d4c5a9 !important;
    opacity: 0.5;
}

/* ===== FOOTER ===== */
.site-footer {
    background: #0d1f30 !important;
    color: #c0d0e0 !important;
    border-top: 4px solid #e8a027;
}

.site-footer a {
    color: #e8a027 !important;
}

.site-footer a:hover {
    color: #ffffff !important;
}

/* ===== PAGE TITLES (inner pages) ===== */
.entry-hero .entry-header {
    background: linear-gradient(135deg, #1a3a5c 0%, #2a6496 100%) !important;
    padding: 2.5rem 0 !important;
}

.entry-hero .entry-title {
    color: #ffffff !important;
    font-size: 2rem !important;
    font-weight: 700 !important;
}

/* ===== RESPONSIVE - Large screens ===== */
@media (min-width: 1400px) {
    .entry-content h1 {
        font-size: 2.8rem;
    }

    /* Fullwidth sections get more breathing room */
    .wp-block-group.alignfull {
        padding-top: 50px;
        padding-bottom: 50px;
    }
}

/* ===== RESPONSIVE - Tablets ===== */
@media (max-width: 1024px) {
    .entry-content h1 {
        font-size: 2rem;
    }

    h2.wp-block-heading {
        font-size: 1.5rem;
    }
}

/* ===== RESPONSIVE - Mobile ===== */
@media (max-width: 768px) {
    .entry-content h1 {
        font-size: 1.7rem;
    }

    .wp-block-button__link {
        padding: 10px 22px !important;
        font-size: 0.85rem !important;
    }

    .wp-block-columns .wp-block-column {
        margin-bottom: 1rem;
    }

    .entry-content-wrap {
        padding-left: 16px;
        padding-right: 16px;
    }
}
