/*
Theme Name: Rehber İlk Yardım
Version: 1.0
*/

/* ====================================
   GENERAL
   ==================================== */

html {
  scroll-behavior: smooth;
}

section#landing, section#services, section#faq, div#hijyen-egitimi, div#kurumsal-egitim, div#ozel-egitim {
	scroll-margin-top: calc(var(--header-height, 100px) + 20px); /* Fallback to 120px if JavaScript fails to set the dynamic header height */
}


/* ====================================
   BUTTON TRANSITIONS
   ==================================== */

.wp-block-button__link {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.wp-block-button__link:active {
    transform: translateY(0); 
}

/* ====================================
   SITE HEADER (Frontend)
   ==================================== */

.site-header {
	position: fixed;
	top: 0;
	z-index: 9999;
	transition: background-color 0.3s ease;
}

.site-header.scrolled,
.nocover .site-header {
    background-color: var(--wp--preset--color--primary-dark);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.site-header .header-brand:hover {
	opacity: 0.8;
}

.site-header nav.wp-block-navigation ul li::before,
.site-header nav.wp-block-navigation ul li::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--wp--preset--color--primary-light, #3498db); /* Tema ana rengini çeker */
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0s ease;
}

.site-header nav.wp-block-navigation ul li::before { bottom: 0; }
.site-header nav.wp-block-navigation ul li::after { top: 0; }

.site-header nav.wp-block-navigation ul li:hover::before,
.site-header nav.wp-block-navigation ul li:hover::after {
    transform: scaleX(1);
    transition: transform 0.5s ease;
}


/* ====================================
   ERROR-404 PAGE (Frontend)
   ==================================== */

section.error-404 {
    margin: calc(var(--header-height, 100px) + 60px) 10%;
    max-width: 1168px;
    text-align: center;
}

section.error-404 p.wp-block-paragraph {
    margin-bottom: 3rem; 
    font-size: 1.1em;
}


/* ====================================
   KVKK MODAL
   ==================================== */

#kvkk-modal {
    border: none;
    border-radius: 8px;
    padding: 0;
    max-width: 1100px;
    min-width: 50vw;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    background-color: var(--wp--preset--color--white);
}

#kvkk-modal::backdrop {
    background-color: rgba(15, 23, 42, 0.7); 
    backdrop-filter: blur(4px);
}

.kvkk-text-area {
    padding: 2rem;
    max-height: 80vh;
    overflow-y: auto;
    color: var(--wp--preset--color--primary);
}

.kvkk-text-area h1, 
.kvkk-text-area h2, 
.kvkk-text-area h3, 
.kvkk-text-area h4 {
    color: var(--wp--preset--color--primary-dark);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.kvkk-text-area p, 
.kvkk-text-area ul, 
.kvkk-text-area ol, 
.kvkk-text-area li {
    color: var(--wp--preset--color--primary);
    line-height: 1.6;
}

#kvkk-modal button {
    display: block;
    width: 100%;
    border: none;
    padding: 1rem;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: var(--wp--preset--color--button);
    color: var(--wp--preset--color--white);
    transition: background-color 0.2s ease;
}

#kvkk-modal button:hover {
    background-color: var(--wp--preset--color--button-hvr);
}

.kvkk-text-area::-webkit-scrollbar {
    width: 0.75rem;
}
.kvkk-text-area::-webkit-scrollbar-thumb {
    background: var(--wp--preset--color--border);
    border-radius: 10px;
}

.kvkk-dialog[open] {
    animation: modal-appearance 0.5s ease-out;
}
@keyframes modal-appearance {
    from { opacity: 0; } to { opacity: 1; }
}