/*
Theme Name: Florhosp-theme
Description: A custom WordPress theme for Kistarcsai Flór Ferenc Hospital with accessibility features and responsive design
Author: florhosp
Version: 1.2
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: florhosp
*/

/* Import Google Fonts */
@import url("https://fonts.cdnfonts.com/css/century-gothic");

/* CSS Variables for brand colors */
:root {
    --color-flor-blue: #0098c9;
    --color-flor-green: #7ab590;
    --color-flor-purple: #282465;
    --color-white: #ffffff;
    --color-black: #000000;
    --color-gray-800: #1f2937;
    --color-gray-500: #6b7280;
    --color-gray-200: #e5e7eb;
    --color-gray-100: #f3f4f6;
    --transition-colors:
        color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* Base Styles */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
        Cantarell, sans-serif;
    font-weight: 500;
    color: var(#32373c);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    transition: var(--transition-colors);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* High Contrast Mode */
.high-contrast {
    --color-flor-blue: var(--color-black);
    --color-flor-green: var(--color-black);
}

.high-contrast button,
.high-contrast .button {
    background: var(--color-flor-purple) !important;
    border-color: var(--color-flor-purple) !important;
}

.high-contrast .gradient-bg {
    background: var(--color-flor-purple) !important;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-flor-blue);
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

h1 {
    font-size: 1.875rem;
    font-weight: 700;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

p {
    margin: 0 0 1rem 0;
    color: var(--color-gray-800);
    text-align: justify;
}

/* Links */
a {
    text-decoration: none;
    position: relative;
    cursor: pointer;
    transition: var(--transition-colors);
}

a:not(.link):not(.button):not(.phone-link):not(.search-link) {
    color: var(--color-flor-blue);
}

.link {
    width: fit-content;
    text-decoration: none;
}

.link::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: currentColor;
    transition: width 0.5s ease;
    transform: translateY(2px);
}

.link:hover::before {
    width: 100%;
}

.link-white::before {
    background-color: var(--color-white);
}

/* Buttons */
button,
.button,
.wp-block-button__link {
    background: linear-gradient(
        to right,
        var(--color-flor-blue),
        var(--color-flor-green)
    );
    color: var(--color-white);
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

button:hover,
.button:hover,
.wp-block-button__link:hover {
    opacity: 0.9;
}

button:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

.button-secondary {
    background: var(--color-white);
    color: var(--color-flor-blue);
    border: 2px solid var(--color-flor-blue);
}

.high-contrast .button-secondary {
    border-color: var(--color-flor-purple);
    color: var(--color-flor-purple);
}

/* Layout */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-full {
    width: 100%;
}

/* Header Styles */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--color-white);
}

.header-top {
    background: linear-gradient(
        to right,
        var(--color-flor-blue),
        var(--color-flor-green)
    );
    color: var(--color-white);
    padding: 0.75rem 0;
    font-size: 0.875rem;
}

.high-contrast .header-top {
    background: var(--color-flor-purple) !important;
}

.header-top .container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.header-top a {
    color: var(--color-white);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.site-logo img {
    height: 4rem;
}

main {
    flex: 1;
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav a {
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: var(--transition-colors);
}

.main-nav a:hover,
.main-nav a:focus {
    color: var(--color-flor-purple);
    text-decoration: underline;
    text-underline-offset: 8px;
    text-decoration-thickness: 2px;
}

/* Mega Menu */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100vw;
    background: var(--color-white);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    display: none;
    z-index: 999;
}

.mega-menu.active {
    display: block;
}

.mega-menu-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.mega-menu-content {
    display: flex;
    gap: 3rem;
    margin: 0 auto;
}

.mega-menu-section {
    flex: 1;
}

.mega-menu-featured {
    background: linear-gradient(
        135deg,
        rgba(0, 152, 201, 0.1),
        rgba(122, 181, 144, 0.1)
    );
    padding: 1rem;
    border-radius: 0.75rem;
    min-width: 300px;
    height: fit-content !important;
}

.mega-menu-featured ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

.mega-menu-featured li a {
    padding: 0.5rem !important;
    display: flex !important;
    gap: 0.75rem !important;
    align-items: center !important;
}

.mega-menu-featured a:hover {
    text-decoration: none !important;
    color: var(--color-flor-purple) !important;
}

.mega-menu-featured li a i {
    width: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mega-menu-section a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    color: var(--color-flor-blue);
    font-size: 1.125rem;
    border-radius: 0.5rem;
}

.mega-menu-section a:hover {
    color: var(--color-flor-purple) !important;
}

/* Mobile Navigation */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    padding: 0.5rem;
    cursor: pointer;
    color: black;
}

.mobile-nav {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--color-white);
    z-index: 1001;
    overflow-y: auto;
    padding: 20px;

    /* Animation properties */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px); /* subtle slide-in */
    transition:
        opacity 0.3s ease,
        transform 0.3s ease,
        visibility 0s linear 0.3s; /* delay hiding until fade out finishes */
}

.mobile-nav.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition:
        opacity 0.3s ease,
        transform 0.3s ease,
        visibility 0s;
}

.mobile-nav-content {
    width: 100%;
    height: 100%;
    overflow-y: auto;
}

.mobile-nav-section {
    margin-bottom: 1.5rem;
}

.mobile-nav-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-flor-blue);
    margin-bottom: 0.75rem;
    display: block;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-list li {
    margin-bottom: 0.5rem;
}

.mobile-nav-list a {
    color: var(--color-flor-blue);
    display: block;
}

.mobile-search-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: linear-gradient(
        to right,
        rgba(0, 152, 201, 0.1),
        rgba(122, 181, 144, 0.1)
    );
    border-radius: 0.5rem;
    color: var(--color-flor-blue);
    font-weight: 600;
}

.mobile-nav-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
}

/* Footer */
.site-footer {
    background: linear-gradient(
        to right,
        var(--color-flor-blue),
        var(--color-flor-green)
    );
    color: var(--color-white);
    padding: 3rem 0 1rem;
}

.high-contrast .site-footer {
    background: var(--color-flor-purple) !important;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--color-white);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: 1rem;
}

.footer-section a {
    color: white;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.75rem;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Accessibility Features */
.contrast-toggle {
    background: none;
    color: var(--color-white);
    padding: 4px;
    border-radius: 5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-weight: medium;
}

.contrast-toggle:hover {
    opacity: 0.7;
}

/* Skip to content link for screen readers */
.skip-link {
    position: absolute !important;
    top: -40px;
    left: 6px;
    background: var(--color-black);
    color: var(--color-white);
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
}

.skip-link:focus {
    top: 6px;
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--color-flor-blue);
    outline-offset: 2px;
}

.high-contrast a:focus,
.high-contrast button:focus,
.high-contrast input:focus,
.high-contrast textarea:focus,
.high-contrast select:focus {
    outline-color: var(--color-flor-purple);
}

/* Tags - matching Next.js: px-3 py-1 */
.tag {
    display: inline-block;
    width: min-content;
    height: min-content;
    padding: 0.25rem 0.75rem;
    border: 2px solid var(--color-flor-purple);
    color: var(--color-flor-purple);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    border-radius: 0.5rem;
}

.wp-block-columns {
    flex-direction: row !important;
    gap: 4rem !important;
    align-items: flex-start;
}

/* Tables - matching Next.js decoratedHead / tableDesign styles */
table {
    width: 100%;
    background: #d7eaf4;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    border: 1px solid #d0d0d0 !important;   /* ← halvány szürke külső keret */
}

table thead th,
table thead td {
    background: #eaf4f9;
    padding: 0.75rem;
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--color-gray-800);
    text-align: center;
    border: none !important;
    border-bottom: none !important;          /* ← "Rendelési idő" alatti vonal nincs */
}

table td {
    padding: 6px;
    text-align: center;
    color: var(--color-gray-800);
    border: none !important;
    border-bottom: 1.5px solid #d8d8d8 !important; /* ← halvány szürke, erős szín nélkül */
}

table tbody tr {
    background: var(--color-white);
}

table td:first-child {
    font-weight: 600;
    text-align: left;
}

table tbody tr:hover {
    background: var(--color-gray-100);
    transition: background-color 0.3s ease;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-nav {
        display: none;
    }

    .mobile-nav-toggle {
        display: block;
    }

    .header-top {
        display: none;
    }

    .mega-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        padding: 1rem;
    }

    .mega-menu-content {
        flex-direction: column;
        gap: 2rem;
    }

    .mega-menu-featured {
        min-width: auto;
    }

    .header-contact {
        display: none;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .header-contact {
        display: none;
    }
}

@media (max-width: 480px) {
    .footer-content {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .header-contact {
        display: none;
    }
}

/* WordPress specific styles */
.wp-block-group {
    margin: 2rem 0;
}

.wp-block-table {
    margin: 0;
}

.wp-block-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.wp-block-column {
    flex: 1;
    min-width: 250px;
}

.entry-content {
    margin: 2rem 0;
}

.entry-header {
    margin-bottom: 2rem;
}

.entry-title {
    color: var(--color-flor-blue);
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.2;
}

/* Utility Classes */
.text-center {
    text-align: center;
}
.text-left {
    text-align: left;
}
.text-right {
    text-align: right;
}
.font-bold {
    font-weight: 700;
}
.font-semibold {
    font-weight: 600;
}
.font-medium {
    font-weight: 500;
}
.uppercase {
    text-transform: uppercase;
}
.mb-0 {
    margin-bottom: 0;
}
.mb-1 {
    margin-bottom: 0.25rem;
}
.mb-2 {
    margin-bottom: 0.5rem;
}
.mb-3 {
    margin-bottom: 1rem;
}
.mb-4 {
    margin-bottom: 1.5rem;
}
.mt-0 {
    margin-top: 0;
}
.mt-1 {
    margin-top: 0.25rem;
}
.mt-2 {
    margin-top: 0.5rem;
}
.mt-3 {
    margin-top: 1rem;
}
.mt-4 {
    margin-top: 1.5rem;
}
.mt-5 {
    margin-top: 2rem;
}
.mt-8 {
    margin-top: 3rem;
}

/* ================================================
   GENERIC PAGE CONTENT STYLES
   All content inside .page-content-area is styled
   generically - no classes needed in content HTML
   ================================================ */

/* --- Headings --- */
.page-content-area h1 {
    margin-bottom: 0.75rem;
    font-size: 1.875rem !important;
    font-weight: 700;
    color: var(--color-flor-blue);
}

.page-content-area h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--color-flor-blue);
}

.page-content-area h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
    color: var(--color-flor-blue);
}

.page-content-area h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
    color: var(--color-flor-blue);
}

/* --- Paragraphs --- */
.page-content-area p {
    margin-bottom: 0.75rem;
    color: var(--color-gray-800);
    text-align: justify;
    line-height: 1.6;
}

/* --- Lists --- */
.page-content-area ul {
    list-style: disc;
    color: var(--color-gray-800);
    margin-left: 2rem;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    padding-inline-start: 0;
}

.page-content-area ul li {
    margin-bottom: 0.5rem;
    color: var(--color-gray-800);
}

.page-content-area ol {
    color: var(--color-gray-800);
    margin-left: 2rem;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}

/* --- Tables (generic - no classes needed) --- */
.page-content-area table {
    width: 100%;
    text-align: center;
}

.page-content-area thead td,
.page-content-area thead th {
    padding: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-gray-800);
}

.page-content-area thead td:first-child,
.page-content-area thead tr:first-child th:first-child,
.page-content-area tbody td:first-child,
.page-content-area tbody th:first-child {
    text-align: left !important;
}

.page-content-area tbody td {
    padding: 0.5rem 0.75rem;
    color: var(--color-gray-800);
    vertical-align: top;
}

.page-content-area tbody th {
    padding: 0.5rem 0.75rem;
    vertical-align: top;
}

.page-content-area tbody td:first-child {
    font-weight: 600;
}

/* Table overflow wrapper */
.page-content-area .table-wrapper {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
}

.page-content-area .table-wrapper table {
    border: none;
    border-radius: 0;
}

/* --- Links --- */
.page-content-area a {
    color: var(--color-flor-blue);
    font-weight: 600;
    text-decoration: none;
    position: relative;
    display: inline;
}

.high-contrast page-content-area a {
    color: var(--color-flor-purple) !important;
}

.page-content-area a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Links inside list items */
.page-content-area li a {
    color: var(--color-gray-800);
}

/* --- Sections --- */
.page-content-area section {
    margin-top: 1.25rem;
}

/* --- Strong/Bold --- */
.page-content-area strong,
.page-content-area b {
    font-weight: 700;
    color: var(--color-gray-800);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .page-content-area table {
        display: block;
        overflow-x: auto;
    }
}

/* ================================================
   MEGA MENU overrides (keep nav lists unstyled)
   ================================================ */
.mega-menu-featured ul {
    list-style: none;
    padding-inline-start: 0;
    margin-left: 0;
}

.wp-block-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Közzétételi Lista specific table styles */
.kozzeteteli-lista-table tbody tr td:nth-child(1) {
    width: auto;
    font-weight: 600;
    text-align: center;
}

.kozzeteteli-lista-table tbody tr td:nth-child(2) {
    width: 60%;
}

.kozzeteteli-lista-table tbody tr:first-child td {
    font-weight: 700;
    background: linear-gradient(
        to right,
        rgba(0, 152, 201, 0.2),
        rgba(122, 181, 144, 0.2)
    );
    font-size: 0.875rem;
    text-transform: uppercase;
}

.kozzeteteli-lista-table thead td:last-child,
.kozzeteteli-lista-table tbody td:last-child {
    min-width: 100px;
}

#aktualitasok .page-content-area div:not(.info-block):not(.is-style-colored-info-block) {
    padding: 0 !important;
}

/* Colored info block - reusable gradient callout for post/page content.
   Apply via the Group block's "Színes információs blokk" style in the block
   editor, or add class="info-block" directly on a <div> in a Custom HTML block. */
.info-block,
.wp-block-group.is-style-colored-info-block {
    background: linear-gradient(
        to right,
        rgba(0, 152, 201, 0.3),
        rgba(122, 181, 144, 0.3)
    );
    border-radius: 0.75rem;
    padding: 1.25rem 2rem !important;
    margin-bottom: 1.25rem;
}

/* Baseline support for WordPress's standard image alignment classes.
   Editors set these via the image's "Align" option in the block/classic editor. */
.entry-content img.alignright,
.page-content-area img.alignright,
.entry-content img.alignleft,
.page-content-area img.alignleft {
    display: block;
    width: 100%;
    height: 15rem;
    object-fit: cover;
    object-position: top;
    margin-bottom: 1.25rem;
    border: 1px solid var(--color-gray-200);
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.entry-content img.aligncenter,
.page-content-area img.aligncenter {
    display: block;
    width: 100%;
    max-width: 800px;
    height: auto;
    margin: 0 auto 1.25rem;
    border-radius: 0.5rem;
}

@media (min-width: 768px) {
    .entry-content img.alignright,
    .page-content-area img.alignright {
        float: right;
        width: 33.3333%;
        height: auto;
        margin-left: 2.5rem;
    }

    .entry-content img.alignleft,
    .page-content-area img.alignleft {
        float: left;
        width: 33.3333%;
        height: auto;
        margin-right: 2.5rem;
    }

/* ===== CALL CENTER ===== */
.call-center {
  margin: 1rem 0;
}

.call-center .cc-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

.call-center .cc-phone {
  font-size: 1.5rem;
  font-weight: 500;
 color: #000 !important;            /* ← FEKETE */
  text-decoration: none;
  display: inline-block;
}

.call-center .cc-note {
  color: #9ca3af;
  font-style: italic;
  margin-top: 1rem;
  font-size: 0.875rem;
}
.call-center .cc-note a {
  color: #6b7280;
  font-weight: 600;
  text-decoration: none;
}

.call-center .cc-note a:hover {
  text-decoration: underline;
}
