/**
 * Additional theme styles beyond Tailwind utilities.
 */

html {
    scroll-behavior: smooth;
}

/* Smooth transitions for navigation */
#main-nav {
    transition: background-color 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

/* Aspect ratio for map iframe on older browsers */
.aspect-video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.aspect-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Fix Leaflet z-index within Tailwind */
.leaflet-pane,
.leaflet-control,
.leaflet-top,
.leaflet-bottom {
    z-index: 10 !important;
}

.leaflet-popup {
    z-index: 20 !important;
}

/* Fix Leaflet popup close button within Tailwind */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* --------------------------------------------------------
   Contact Form 7 — styled to match theme
   -------------------------------------------------------- */

.swlrc-form-row--2col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .swlrc-form-row--2col {
        grid-template-columns: 1fr 1fr;
    }
}

.swlrc-form-field {
    margin-bottom: 1.5rem;
}

.swlrc-form-row .swlrc-form-field {
    margin-bottom: 0;
}

.swlrc-form-row {
    margin-bottom: 1.5rem;
}

.swlrc-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgb(148 163 184); /* slate-400 */
    margin-bottom: 0.5rem;
}

.swlrc-form br,
.swlrc-form p:empty {
    display: none;
}

.swlrc-label--dark {
    color: rgb(100 116 139); /* slate-500 */
}

.swlrc-input,
.wpcf7 .swlrc-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background-color: rgb(248 250 252); /* slate-50 */
    border: 1px solid rgb(226 232 240); /* slate-200 */
    outline: none;
    transition: all 0.15s ease;
    font-size: 0.875rem;
    font-family: inherit;
    color: rgb(30 41 59); /* slate-800 */
    box-sizing: border-box;
}

.swlrc-input:focus,
.wpcf7 .swlrc-input:focus {
    box-shadow: 0 0 0 2px rgb(244 63 94 / 0.5); /* rose-500 ring */
    border-color: transparent;
}

.swlrc-input::placeholder {
    color: rgb(148 163 184); /* slate-400 */
}

textarea.swlrc-input,
.wpcf7 textarea.swlrc-input {
    resize: none;
    min-height: 8rem;
}

select.swlrc-input,
.wpcf7 select.swlrc-input {
    appearance: auto;
    color: rgb(51 65 85); /* slate-700 */
}

.wpcf7 .wpcf7-form-control-wrap {
    display: block;
}

/* Submit buttons */
.swlrc-form-submit {
    margin-top: 0.5rem;
}

.wpcf7 .swlrc-submit,
.wpcf7 .swlrc-submit--primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-weight: 700;
    border-radius: 0.5rem;
    transition: all 0.15s ease;
    cursor: pointer;
    border: none;
    font-size: 0.875rem;
    font-family: inherit;
}

.wpcf7 .swlrc-submit {
    background-color: rgb(190 18 60); /* rose-700 */
    color: #fff;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.wpcf7 .swlrc-submit:hover {
    background-color: rgb(159 18 57); /* rose-800 */
}

.wpcf7 .swlrc-submit--primary {
    width: 100%;
    background-color: rgb(190 18 60); /* rose-700 */
    color: #fff;
    padding: 1rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    margin-top: 0.5rem;
}

.wpcf7 .swlrc-submit--primary:hover {
    background-color: rgb(159 18 57); /* rose-800 */
}

/* Spinner */
.wpcf7 .wpcf7-spinner {
    margin-left: 0.5rem;
}

/* Validation messages */
.wpcf7 .wpcf7-not-valid-tip {
    color: rgb(225 29 72); /* rose-600 */
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.wpcf7 .wpcf7-response-output {
    margin: 1rem 0 0;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.wpcf7 .wpcf7-mail-sent-ok,
.wpcf7 form.sent .wpcf7-response-output {
    border-color: rgb(34 197 94); /* green-500 */
    background-color: rgb(240 253 244); /* green-50 */
    color: rgb(22 101 52); /* green-800 */
}

.wpcf7 .wpcf7-validation-errors,
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output {
    border-color: rgb(225 29 72); /* rose-600 */
    background-color: rgb(255 241 242); /* rose-50 */
    color: rgb(159 18 57); /* rose-800 */
}

.wpcf7 .wpcf7-not-valid {
    border-color: rgb(225 29 72); /* rose-600 */
}

/* --------------------------------------------------------
   WordPress Navigation Menus
   -------------------------------------------------------- */

/* Desktop header nav */
.swlrc-desktop-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.swlrc-desktop-nav li {
    margin: 0;
}

.swlrc-desktop-nav a {
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
}

/* Transparent header (top of page) */
#main-nav.bg-transparent .swlrc-desktop-nav a {
    color: #fff;
}

/* White header (scrolled) */
#main-nav.bg-white .swlrc-desktop-nav a {
    color: rgb(51 65 85); /* slate-700 */
}

.swlrc-desktop-nav a:hover {
    color: rgb(225 29 72) !important; /* rose-600 — override both states */
}

/* Mobile header nav */
.swlrc-mobile-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.swlrc-mobile-nav li {
    margin: 0;
}

.swlrc-mobile-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    text-align: left;
    padding: 1rem 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    color: rgb(51 65 85); /* slate-700 */
    text-decoration: none;
    border-bottom: 1px solid rgb(248 250 252); /* slate-50 */
    transition: background-color 0.15s, color 0.15s;
}

.swlrc-mobile-nav a:hover {
    background-color: rgb(255 241 242); /* rose-50 */
    color: rgb(190 18 60); /* rose-700 */
}

/* Footer nav */
.swlrc-footer-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.swlrc-footer-nav li {
    margin: 0;
}

.swlrc-footer-nav a {
    font-size: 0.875rem;
    color: rgb(148 163 184); /* slate-400 */
    text-decoration: none;
    transition: color 0.15s ease;
}

.swlrc-footer-nav a:hover {
    color: #fff;
}

/* --------------------------------------------------------
   Blog pagination
   -------------------------------------------------------- */

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.nav-links .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgb(51 65 85); /* slate-700 */
    background: #fff;
    border: 1px solid rgb(226 232 240); /* slate-200 */
    text-decoration: none;
    transition: all 0.15s ease;
}

.nav-links .page-numbers:hover {
    background: rgb(255 241 242); /* rose-50 */
    border-color: rgb(190 18 60); /* rose-700 */
    color: rgb(190 18 60);
}

.nav-links .page-numbers.current {
    background: rgb(190 18 60); /* rose-700 */
    border-color: rgb(190 18 60);
    color: #fff;
}

/* --------------------------------------------------------
   Line clamp utility (for older browsers without Tailwind v3)
   -------------------------------------------------------- */

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
